xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ *__m128;

/* Variables and functions */
__m128 __attribute__((__always___, __nodebug__))
_mm_add_ss(__m128 a, __m128 b) {
  a[0] += b[0];
  return a;
}


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

x86 assembly (clang, -O2):
<_mm_add_ss>:
mov    %rdi,%rax
mov    (%rsi),%rcx
add    %rcx,(%rdi)
ret

LLVM IR (-O0):
define i64* @_mm_add_ss(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 = getelementptr inbounds i64, i64* %5, i64 0
%7 = load i64, i64* %6
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = add nsw i64 %10, %7
store i64 %11, i64* %9
%12 = load i64*, i64** %3
ret i64* %12
}

LLVM IR (-O2):
define i64* @_mm_add_ss(i64* returned %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = load i64, i64* %0
%5 = add nsw i64 %4, %3
store i64 %5, i64* %0
ret i64* %0
}
/* Variables and functions */
void hpgInitParticles(void **data) { *data = NULL; }


x86 assembly (clang, -O0):
<hpgInitParticles>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpgInitParticles>:
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @hpgInitParticles(i8** nocapture writeonly %0) {
store i8* null, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MAIN__();
int cblat2_() {
  MAIN__();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @cblat2_() {
%1 = tail call i32 (...) @MAIN__()
ret i32 0
}
/* Variables and functions */
float dB_to_coefficient(float);
float meter_deflect_ppm(float db) {
  if (db < -30) {
    return (dB_to_coefficient(db) * 2.258769757f);
  } else {
    const float rv = (db + 32.0f) / 28.0f;
    if (rv < 1.0) {
      return rv;
    } else {
      return 1.0;
    }
  }
}


x86 assembly (clang, -O0):
<meter_deflect_ppm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xedb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    114f <meter_deflect_ppm+0x3f>
movss  -0x8(%rbp),%xmm0
call   1030 <dB_to_coefficient@plt>
movss  0xecf(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a4 <meter_deflect_ppm+0x94>
movss  0xeb1(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  0xea0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe9a(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1197 <meter_deflect_ppm+0x87>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a4 <meter_deflect_ppm+0x94>
movss  0xe6d(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<meter_deflect_ppm>:
push   %rax
movss  0xee7(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    112d <meter_deflect_ppm+0x1d>
call   1030 <dB_to_coefficient@plt>
mulss  0xee5(%rip),%xmm0
pop    %rax
ret
addss  0xecf(%rip),%xmm0
divss  0xecb(%rip),%xmm0
minss  0xec7(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @meter_deflect_ppm(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %3
%5 = load float, float* %3
%6 = fcmp olt float %5, -3.000000e+01
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load float, float* %3
%9 = call float @dB_to_coefficient(float %8)
%10 = fmul float %9, 0x400211F5E0000000
store float %10, float* %2
br label %21
11: ; preds = %1
%12 = load float, float* %3
%13 = fadd float %12, 3.200000e+01
%14 = fdiv float %13, 2.800000e+01
store float %14, float* %4
%15 = load float, float* %4
%16 = fpext float %15 to double
%17 = fcmp olt double %16, 1.000000e+00
br i1 %17, label %18, label %20
18: ; preds = %11
%19 = load float, float* %4
store float %19, float* %2
br label %21
20: ; preds = %11
store float 1.000000e+00, float* %2
br label %21
21: ; preds = %20, %18, %7
%22 = load float, float* %2
ret float %22
}

LLVM IR (-O2):
define float @meter_deflect_ppm(float %0) {
%2 = fcmp olt float %0, -3.000000e+01
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call float @dB_to_coefficient(float %0)
%5 = fmul float %4, 0x400211F5E0000000
br label %11
6: ; preds = %1
%7 = fadd float %0, 3.200000e+01
%8 = fdiv float %7, 2.800000e+01
%9 = fcmp olt float %8, 1.000000e+00
%10 = select i1 %9, float %8, float 1.000000e+00
br label %11
11: ; preds = %6, %3
%12 = phi float [ %5, %3 ], [ %10, %6 ]
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M574_f(char *s) {
  debug("M574_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M574_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M574_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M574_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M574_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M574_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M574_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
unsigned byte_y(const unsigned cfgbit) {
  return (cfgbit >> 3) & ((1 << (8 - 3)) - 1);
}


x86 assembly (clang, -O0):
<byte_y>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x3,%eax
and    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_y>:
mov    %edi,%eax
shr    $0x3,%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @byte_y(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 3
%5 = and i32 %4, 31
ret i32 %5
}

LLVM IR (-O2):
define i32 @byte_y(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 31
ret i32 %3
}
int get_string_len(char *str) {
  int len;
  len = 0;
  while (str[len] != 0) {
    len += 1;
  }
  return (len);
}


x86 assembly (clang, -O0):
<get_string_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <get_string_len+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_string_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string_len>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <get_string_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_string_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
double __ieee754_sqrt(double);
double jsqrt(double x) { return __ieee754_sqrt(x); }


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

x86 assembly (clang, -O2):
<jsqrt>:
jmp    1030 <__ieee754_sqrt@plt>

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

LLVM IR (-O2):
define double @jsqrt(double %0) {
%2 = tail call double @__ieee754_sqrt(double %0)
ret double %2
}
unsigned hash(const char *s) {
  unsigned hash_val;
  char *p;
  p = (char *)s;
  hash_val = 0;
  while (*p) {
    hash_val = hash_val * 31 + *p++;
  }
  return hash_val;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1144 <hash+0x44>
imul   $0x1f,-0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <hash+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <hash+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = mul i32 %7, 31
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
void EVP_PKEY_assign(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_assign() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void fistp_m32(void *_m32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0xDB);
  put8(0x1D);
  put32((unsigned long)(m32));
}


x86 assembly (clang, -O0):
<fistp_m32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0xdb,%edi
call   1030 <put8@plt>
mov    $0x1d,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fistp_m32>:
push   %rbx
mov    %rdi,%rbx
mov    $0xdb,%edi
call   1030 <put8@plt>
mov    $0x1d,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @fistp_m32(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = call i32 @put8(i32 219)
%7 = call i32 @put8(i32 29)
%8 = load i64*, i64** %3
%9 = ptrtoint i64* %8 to i64
%10 = call i32 @put32(i64 %9)
ret void
}

LLVM IR (-O2):
define void @fistp_m32(i8* %0) {
%2 = tail call i32 @put8(i32 219)
%3 = tail call i32 @put8(i32 29)
%4 = ptrtoint i8* %0 to i64
%5 = tail call i32 @put32(i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lhsy();
int /*<<< orphan*/ y_backsubstitute();
int /*<<< orphan*/ y_solve_cell();
void y_solve(void) {
  lhsy();
  y_solve_cell();
  y_backsubstitute();
}


x86 assembly (clang, -O0):
<y_solve>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <lhsy@plt>
mov    $0x0,%al
call   1050 <y_solve_cell@plt>
mov    $0x0,%al
call   1040 <y_backsubstitute@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<y_solve>:
push   %rax
xor    %eax,%eax
call   1030 <lhsy@plt>
xor    %eax,%eax
call   1050 <y_solve_cell@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <y_backsubstitute@plt>

LLVM IR (-O0):
define void @y_solve() {
%1 = call i32 (...) @lhsy()
%2 = call i32 (...) @y_solve_cell()
%3 = call i32 (...) @y_backsubstitute()
ret void
}

LLVM IR (-O2):
define void @y_solve() {
%1 = tail call i32 (...) @lhsy()
%2 = tail call i32 (...) @y_solve_cell()
%3 = tail call i32 (...) @y_backsubstitute()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glDepthMask(unsigned char);
void DepthMask(unsigned char m) { glDepthMask(m); }


x86 assembly (clang, -O0):
<DepthMask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <glDepthMask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DepthMask>:
jmp    1030 <glDepthMask@plt>

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

LLVM IR (-O2):
define void @DepthMask(i8 zeroext %0) {
%2 = tail call i32 @glDepthMask(i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  if (num < 0)
    printf("%d", -num);
  else
    printf("%d", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    115f <main+0x3f>
xor    %esi,%esi
sub    -0x8(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    116e <main+0x4e>
mov    -0x8(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%esi
neg    %esi
cmovs  %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @llvm.abs.i32(i32 %4, i1 true)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void av_format_set_metadata_header_padding() {}


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

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

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

LLVM IR (-O2):
define void @av_format_set_metadata_header_padding() {
ret void
}
/* Variables and functions */
unsigned int strlen(const char *s __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_trace();
void dummy_function() { print_trace(); }


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

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

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

LLVM IR (-O2):
define void @dummy_function() {
%1 = tail call i32 (...) @print_trace()
ret void
}
/* Type definitions */
struct resist_bitmask_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ resist_bitmask_clear(struct resist_bitmask_t *);
int /*<<< orphan*/ resist_bitmask_init(struct resist_bitmask_t **, size_t);
void resist_bitmask_init_clear(struct resist_bitmask_t **mask, size_t size) {
  resist_bitmask_init(mask, size);
  resist_bitmask_clear(*mask);
}


x86 assembly (clang, -O0):
<resist_bitmask_init_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <resist_bitmask_init@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <resist_bitmask_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resist_bitmask_init_clear>:
push   %rbx
mov    %rdi,%rbx
call   1040 <resist_bitmask_init@plt>
mov    (%rbx),%rdi
pop    %rbx
jmp    1030 <resist_bitmask_clear@plt>

LLVM IR (-O0):
%struct.resist_bitmask_t = type { i32 }
define void @resist_bitmask_init_clear(%struct.resist_bitmask_t** %0, i64 %1) {
%3 = alloca %struct.resist_bitmask_t**
%4 = alloca i64
store %struct.resist_bitmask_t** %0, %struct.resist_bitmask_t*** %3
store i64 %1, i64* %4
%5 = load %struct.resist_bitmask_t**, %struct.resist_bitmask_t*** %3
%6 = load i64, i64* %4
%7 = call i32 @resist_bitmask_init(%struct.resist_bitmask_t** %5, i64 %6)
%8 = load %struct.resist_bitmask_t**, %struct.resist_bitmask_t*** %3
%9 = load %struct.resist_bitmask_t*, %struct.resist_bitmask_t** %8
%10 = call i32 @resist_bitmask_clear(%struct.resist_bitmask_t* %9)
ret void
}

LLVM IR (-O2):
%struct.resist_bitmask_t = type { i32 }
define void @resist_bitmask_init_clear(%struct.resist_bitmask_t** %0, i64 %1) {
%3 = tail call i32 @resist_bitmask_init(%struct.resist_bitmask_t** %0, i64 %1)
%4 = load %struct.resist_bitmask_t*, %struct.resist_bitmask_t** %0
%5 = tail call i32 @resist_bitmask_clear(%struct.resist_bitmask_t* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int bar();
int main() {
  if (bar() != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <bar@plt>
cmp    $0x1,%eax
je     1146 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
cmp    $0x1,%eax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @bar()
%3 = icmp ne i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ counting_sort(int *, int);
int /*<<< orphan*/ print_array(int *, int);
int /*<<< orphan*/ random_array(int *, int);
int main(void) {
  int a[20];
  random_array(a, 20);
  print_array(a, 20);
  counting_sort(a, 20);
  print_array(a, 20);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1050 <random_array@plt>
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1040 <counting_sort@plt>
lea    -0x60(%rbp),%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
call   1050 <random_array@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1040 <counting_sort@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%4 = call i32 @random_array(i32* %3, i32 20)
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%6 = call i32 @print_array(i32* %5, i32 20)
%7 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%8 = call i32 @counting_sort(i32* %7, i32 20)
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%10 = call i32 @print_array(i32* %9, i32 20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 0
%4 = call i32 @random_array(i32* %3, i32 20)
%5 = call i32 @print_array(i32* %3, i32 20)
%6 = call i32 @counting_sort(i32* %3, i32 20)
%7 = call i32 @print_array(i32* %3, i32 20)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_32(int /*<<< orphan*/ const *, int);
uint32_t
sdp_event_query_service_record_handle_get_record_handle(const uint8_t *event) {
  return little_endian_read_32(event, 6);
}


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

x86 assembly (clang, -O2):
<sdp_event_query_service_record_handle_get_record_handle>:
mov    $0x6,%esi
jmp    1030 <little_endian_read_32@plt>

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

LLVM IR (-O2):
define i32 @sdp_event_query_service_record_handle_get_record_handle(i32* %0) {
%2 = tail call i32 @little_endian_read_32(i32* %0, i32 6)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char const *);
scalar_t__ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(scalar_t__);
void cd(const char *path) {
  errno = 0;
  chdir(path);
  if (errno)
    fprintf(stderr, "shell: cd: %s: %s\n", path, strerror(errno));
}


x86 assembly (clang, -O0):
<cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <chdir@plt>
mov    0x2e7e(%rip),%rax
cmpq   $0x0,(%rax)
je     119d <cd+0x6d>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e59(%rip),%rax
mov    (%rax),%rdi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe68(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cd>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2e9b(%rip),%rbp
movq   $0x0,0x0(%rbp)
call   1030 <chdir@plt>
mov    0x0(%rbp),%rdi
test   %rdi,%rdi
je     117b <cd+0x4b>
mov    0x2e86(%rip),%rax
mov    (%rax),%ebp
call   1050 <strerror@plt>
lea    0xe98(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@stderr = global i32 0
@.str = [19 x i8] c"shell: cd: %s: %s\0A\00"
define void @cd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i64 0, i64* @errno
%3 = load i8*, i8** %2
%4 = call i32 @chdir(i8* %3)
%5 = load i64, i64* @errno
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %2
%10 = load i64, i64* @errno
%11 = call i8* @strerror(i64 %10)
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %11)
br label %13
13: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@stderr = global i32 0
@.str = [19 x i8] c"shell: cd: %s: %s\0A\00"
define void @cd(i8* %0) {
store i64 0, i64* @errno
%2 = tail call i32 @chdir(i8* %0)
%3 = load i64, i64* @errno
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i8* @strerror(i64 %3)
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %7)
br label %9
9: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, int, char *);
char *toBinary(int);
int main() {
  char *tmp;
  for (int i = -16; i <= 16; i++) {
    tmp = toBinary(i);
    printf("%d:\t%s\n", i, tmp);
    free(tmp);
    tmp = NULL;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xfffffff0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jg     118e <main+0x5e>
mov    -0x14(%rbp),%edi
call   1050 <toBinary@plt>
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0xfffffff0,%ebx
lea    0xebf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1050 <toBinary@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %ebx,%esi
mov    %rax,%rdx
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x1,%ebx
cmp    $0x11,%ebx
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d:\09%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
store i32 -16, i32* %3
br label %4
4: ; preds = %15, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 16
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %3
%9 = call i8* @toBinary(i32 %8)
store i8* %9, i8** %2
%10 = load i32, i32* %3
%11 = load i8*, i8** %2
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11)
%13 = load i8*, i8** %2
%14 = call i32 @free(i8* %13)
store i8* null, i8** %2
br label %15
15: ; preds = %7
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %4
18: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d:\09%s\0A\00"
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ -16, %0 ], [ %7, %2 ]
%4 = tail call i8* @toBinary(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %4)
%6 = tail call i32 @free(i8* %4)
%7 = add nsw i32 %3, 1
%8 = icmp eq i32 %7, 17
br i1 %8, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void sayilariOku(int dizi[], int boyut) {
  int i;
  for (i = 0; i < boyut; i++) {
    scanf("%d", &dizi[i]);
  }
}


x86 assembly (clang, -O0):
<sayilariOku>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <sayilariOku+0x4b>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <sayilariOku+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sayilariOku>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1145 <sayilariOku+0x35>
mov    %rdi,%rbx
mov    %esi,%r15d
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r15
jne    1130 <sayilariOku+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @sayilariOku(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @sayilariOku(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void print_int(const void *a) { printf("%d ", (*(const int *)a)); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @print_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
struct lc_dev {
  int dummy;
};
typedef scalar_t__ ssize_t;

/* Variables and functions */
scalar_t__ lc_out(struct lc_dev *);
void *lc_writer(void *arg) {
  struct lc_dev *dev = arg;
  while (1) {
    ssize_t nw = lc_out(dev);
    if (nw == 0)
      break;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<lc_writer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <lc_out@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1141 <lc_writer+0x31>
jmp    1146 <lc_writer+0x36>
jmp    1124 <lc_writer+0x14>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lc_writer>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <lc_out@plt>
test   %rax,%rax
jne    1120 <lc_writer+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.lc_dev = type { i32 }
define i8* @lc_writer(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.lc_dev*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to %struct.lc_dev*
store %struct.lc_dev* %6, %struct.lc_dev** %3
br label %7
7: ; preds = %1, %13
%8 = load %struct.lc_dev*, %struct.lc_dev** %3
%9 = call i64 @lc_out(%struct.lc_dev* %8)
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
br label %14
13: ; preds = %7
br label %7
14: ; preds = %12
ret i8* null
}

LLVM IR (-O2):
%struct.lc_dev = type { i32 }
define noalias i8* @lc_writer(i8* %0) {
%2 = bitcast i8* %0 to %struct.lc_dev*
br label %3
3: ; preds = %3, %1
%4 = tail call i64 @lc_out(%struct.lc_dev* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ dread(char *, int, int);
unsigned int getUnsignedInt(char *);
unsigned int getLocationOfCurrent() {
  char buffer[2];
  dread(buffer, (0x01E), 2);
  return getUnsignedInt(buffer);
}


x86 assembly (clang, -O0):
<getLocationOfCurrent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x2(%rbp),%rdi
mov    $0x1e,%esi
mov    $0x2,%edx
call   1040 <dread@plt>
lea    -0x2(%rbp),%rdi
call   1030 <getUnsignedInt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLocationOfCurrent>:
push   %rbx
sub    $0x10,%rsp
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x2,%edx
call   1040 <dread@plt>
mov    %rbx,%rdi
call   1030 <getUnsignedInt@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getLocationOfCurrent() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @dread(i8* %2, i32 30, i32 2)
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%5 = call i32 @getUnsignedInt(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @getLocationOfCurrent() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @dread(i8* %2, i32 30, i32 2)
%4 = call i32 @getUnsignedInt(i8* %2)
ret i32 %4
}
/* Type definitions */
struct page {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ PageSwapBacked(struct page *);
int page_is_file_cache(struct page *page) { return !PageSwapBacked(page); }


x86 assembly (clang, -O0):
<page_is_file_cache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <PageSwapBacked@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<page_is_file_cache>:
push   %rax
call   1030 <PageSwapBacked@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.page = type { i32 }
define i32 @page_is_file_cache(%struct.page* %0) {
%2 = alloca %struct.page*
store %struct.page* %0, %struct.page** %2
%3 = load %struct.page*, %struct.page** %2
%4 = call i32 @PageSwapBacked(%struct.page* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.page = type { i32 }
define i32 @page_is_file_cache(%struct.page* %0) {
%2 = tail call i32 @PageSwapBacked(%struct.page* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int compareStr(char *str1, char *str2, int begin, int sz) {
  int ret = 1, i;
  for (i = 0; i < sz; ++i) {
    if (str2[i] != str1[begin + i]) {
      ret = 0;
      break;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<compareStr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1170 <compareStr+0x70>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x14(%rbp),%edx
add    -0x20(%rbp),%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     115d <compareStr+0x5d>
movl   $0x0,-0x1c(%rbp)
jmp    1170 <compareStr+0x70>
jmp    1162 <compareStr+0x62>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1120 <compareStr+0x20>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareStr>:
mov    $0x1,%eax
test   %ecx,%ecx
jle    1132 <compareStr+0x32>
movslq %edx,%rdx
mov    %ecx,%r8d
add    %rdx,%rdi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rsi,%rdx,1),%ecx
cmp    (%rdi,%rdx,1),%cl
jne    1133 <compareStr+0x33>
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1120 <compareStr+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @compareStr(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 1, i32* %9
store i32 0, i32* %10
br label %11
11: ; preds = %33, %4
%12 = load i32, i32* %10
%13 = load i32, i32* %8
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %36
15: ; preds = %11
%16 = load i8*, i8** %6
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8*, i8** %5
%23 = load i32, i32* %7
%24 = load i32, i32* %10
%25 = add nsw i32 %23, %24
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %22, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %21, %29
br i1 %30, label %31, label %32
31: ; preds = %15
store i32 0, i32* %9
br label %36
32: ; preds = %15
br label %33
33: ; preds = %32
%34 = load i32, i32* %10
%35 = add nsw i32 %34, 1
store i32 %35, i32* %10
br label %11
36: ; preds = %31, %11
%37 = load i32, i32* %9
ret i32 %37
}

LLVM IR (-O2):
define i32 @compareStr(i8* nocapture %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %3, 0
br i1 %5, label %6, label %20
6: ; preds = %4
%7 = sext i32 %2 to i64
%8 = zext i32 %3 to i64
br label %11
9: ; preds = %11
%10 = icmp eq i64 %19, %8
br i1 %10, label %20, label %11
11: ; preds = %6, %9
%12 = phi i64 [ 0, %6 ], [ %19, %9 ]
%13 = getelementptr inbounds i8, i8* %1, i64 %12
%14 = load i8, i8* %13
%15 = add nsw i64 %12, %7
%16 = getelementptr inbounds i8, i8* %0, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %14, %17
%19 = add nuw nsw i64 %12, 1
br i1 %18, label %9, label %20
20: ; preds = %9, %11, %4
%21 = phi i32 [ 1, %4 ], [ 0, %11 ], [ 1, %9 ]
ret i32 %21
}
/* Variables and functions */
void *fixup_null_alloc(size_t);
void *realloc(void *, size_t);
void *xmalloc(size_t);
void *xrealloc(void *p, size_t n) {
  if (p == NULL)
    return xmalloc(n);
  p = realloc(p, n);
  if (p == NULL)
    p = fixup_null_alloc(n);
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115d <xrealloc+0x2d>
mov    -0x18(%rbp),%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x8(%rbp)
jmp    118e <xrealloc+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1186 <xrealloc+0x56>
mov    -0x18(%rbp),%rdi
call   1030 <fixup_null_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     1148 <xrealloc+0x18>
mov    %rbx,%rsi
call   1050 <realloc@plt>
test   %rax,%rax
je     1151 <xrealloc+0x21>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <xmalloc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fixup_null_alloc@plt>

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i64, i64* %5
%10 = call i8* @xmalloc(i64 %9)
store i8* %10, i8** %3
br label %22
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i64, i64* %5
%14 = call i8* @realloc(i8* %12, i64 %13)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = load i64, i64* %5
%19 = call i8* @fixup_null_alloc(i64 %18)
store i8* %19, i8** %4
br label %20
20: ; preds = %17, %11
%21 = load i8*, i8** %4
store i8* %21, i8** %3
br label %22
22: ; preds = %20, %8
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i8* @xmalloc(i64 %1)
br label %11
6: ; preds = %2
%7 = tail call i8* @realloc(i8* %0, i64 %1)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i8* @fixup_null_alloc(i64 %1)
br label %11
11: ; preds = %6, %9, %4
%12 = phi i8* [ %5, %4 ], [ %10, %9 ], [ %7, %6 ]
ret i8* %12
}
/* Variables and functions */
int fun_d(int);
__attribute__((always_)) int fun_c(int argc) {
  static int locc = 0;
  locc += argc;
  return fun_d(locc);
}


x86 assembly (clang, -O0):
<fun_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    0x2f08(%rip),%eax
mov    %eax,0x2f02(%rip)
mov    0x2efc(%rip),%edi
call   1030 <fun_d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_c>:
add    0x2f16(%rip),%edi
mov    %edi,0x2f10(%rip)
jmp    1030 <fun_d@plt>

LLVM IR (-O0):
@fun_c.locc = internal global i32 0
define i32 @fun_c(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @fun_c.locc
%5 = add nsw i32 %4, %3
store i32 %5, i32* @fun_c.locc
%6 = load i32, i32* @fun_c.locc
%7 = call i32 @fun_d(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@fun_c.locc = internal unnamed_addr global i32 0
define i32 @fun_c(i32 %0) {
%2 = load i32, i32* @fun_c.locc
%3 = add nsw i32 %2, %0
store i32 %3, i32* @fun_c.locc
%4 = tail call i32 @fun_d(i32 %3)
ret i32 %4
}
/* Variables and functions */
int f32(int *);
int f33(int *p) { return f32(p); }


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

x86 assembly (clang, -O2):
<f33>:
jmp    1030 <f32@plt>

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

LLVM IR (-O2):
define i32 @f33(i32* %0) {
%2 = tail call i32 @f32(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct tcphdr {
  int /*<<< orphan*/ seq;
};

/* Variables and functions */
uint32_t _tcphdr_seq(struct tcphdr *h) { return h->seq; }


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

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

LLVM IR (-O0):
%struct.tcphdr = type { i32 }
define i32 @_tcphdr_seq(%struct.tcphdr* %0) {
%2 = alloca %struct.tcphdr*
store %struct.tcphdr* %0, %struct.tcphdr** %2
%3 = load %struct.tcphdr*, %struct.tcphdr** %2
%4 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.tcphdr = type { i32 }
define i32 @_tcphdr_seq(%struct.tcphdr* nocapture %0) {
%2 = getelementptr inbounds %struct.tcphdr, %struct.tcphdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
void Creator_destruct(struct Creator *self) {}


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

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

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

LLVM IR (-O2):
%struct.Creator = type opaque
define void @Creator_destruct(%struct.Creator* nocapture %0) {
ret void
}
void foo_2_1_1_2_1_1_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_1_1_1_2_1() {
ret void
}
void halt() {
a:
  goto a;
}


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

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

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

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