xunge/DecIR huggingface dataset:
/* Variables and functions */
char *name(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  printf("Enter the Number of the month: ");
  int m;
  scanf("%d", &m);
  char *a;
  a = name(m);
  printf("Month: %s \n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <name@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <name@plt>
lea    0xec3(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Enter the Number of the month: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"Month: %s \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i8* @name(i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Enter the Number of the month: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"Month: %s \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i8* @name(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret i32 0
}
sdebu(len) int len;
{
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
  {};
}


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

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

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

LLVM IR (-O2):
define i32 @sdebu(i32 %0) {
ret i32 undef
}
void function_2() {}


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

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

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

LLVM IR (-O2):
define void @function_2() {
ret void
}
double F(double x) { return x * x * x - 3 * x + 1; }


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

x86 assembly (clang, -O2):
<F>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xeec(%rip),%xmm0
addsd  %xmm1,%xmm0
addsd  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @F(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fmul double 3.000000e+00, %7
%9 = fneg double %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
%11 = fadd double %10, 1.000000e+00
ret double %11
}

LLVM IR (-O2):
define double @F(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %0, -3.000000e+00
%4 = tail call double @llvm.fmuladd.f64(double %2, double %0, double %3)
%5 = fadd double %4, 1.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
void Shutdown(void) {
  endwin();
  exit(1);
}


x86 assembly (clang, -O0):
<Shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <endwin@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Shutdown>:
push   %rax
xor    %eax,%eax
call   1030 <endwin@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @Shutdown() {
%1 = call i32 (...) @endwin()
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @Shutdown() {
%1 = tail call i32 (...) @endwin()
%2 = tail call i32 @exit(i32 1)
unreachable
}
reg0imm1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if (r0 <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<reg0imm1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movsd  0xedc(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     113b <reg0imm1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <reg0imm1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg0imm1>:
movsd  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @reg0imm1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double, double* %8
%15 = fcmp ole double %14, 3.300000e+01
br i1 %15, label %16, label %17
16: ; preds = %6
store i32 1, i32* %7
br label %18
17: ; preds = %6
store i32 0, i32* %7
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @reg0imm1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = fcmp ole double %0, 3.300000e+01
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
unsigned long __crc32(unsigned char *, int);
void __make_crc_table(unsigned long crcTable[]) {
  unsigned char b = 0;
  do {
    crcTable[(size_t)b] = __crc32(&b, 1);
  } while (0 != ++b);
}


x86 assembly (clang, -O0):
<__make_crc_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
lea    -0x9(%rbp),%rdi
mov    $0x1,%esi
call   1030 <__crc32@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movzbl -0x9(%rbp),%ecx
mov    %rdx,(%rax,%rcx,8)
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
movzbl %al,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1120 <__make_crc_table+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__make_crc_table>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <__crc32@plt>
movzbl 0x7(%rsp),%ecx
mov    %rax,(%rbx,%rcx,8)
inc    %cl
mov    %cl,0x7(%rsp)
jne    1130 <__make_crc_table+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @__make_crc_table(i64* nocapture writeonly %0) {
%2 = alloca i8
store i8 0, i8* %2
br label %3
3: ; preds = %3, %1
%4 = call i64 @__crc32(i8* %2, i32 1)
%5 = load i8, i8* %2
%6 = zext i8 %5 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 %6
store i64 %4, i64* %7
%8 = add i8 %5, 1
store i8 %8, i8* %2
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int f139(int *);
int f140(int *p) { return f139(p); }


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

x86 assembly (clang, -O2):
<f140>:
jmp    1030 <f139@plt>

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

LLVM IR (-O2):
define i32 @f140(i32* %0) {
%2 = tail call i32 @f139(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int UINT64_C(int);
int time(int /*<<< orphan*/ *);
uint64_t monotonic_nseconds() { return UINT64_C(1000000000) * time(NULL); }


x86 assembly (clang, -O0):
<monotonic_nseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3b9aca00,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<monotonic_nseconds>:
push   %rbx
mov    $0x3b9aca00,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1040 <time@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @monotonic_nseconds() {
%1 = call i32 @UINT64_C(i32 1000000000)
%2 = call i32 @time(i32* null)
%3 = mul nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @monotonic_nseconds() {
%1 = tail call i32 @UINT64_C(i32 1000000000)
%2 = tail call i32 @time(i32* null)
%3 = mul nsw i32 %2, %1
ret i32 %3
}
int f(int in) {
  if (in == 0) {
    return 0;
  } else {
    return 3 * f(in - 1) + 6;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <f+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1145 <f+0x35>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <f@plt>
imul   $0x3,%eax,%eax
add    $0x6,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
je     1128 <f+0x18>
push   %rax
add    $0xffffffff,%edi
call   1030 <f@plt>
lea    (%rax,%rax,2),%eax
add    $0x6,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi i32 [ %9, %5 ], [ 0, %1 ]
ret i32 %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call i32 @f(i32 %6)
%8 = mul nsw i32 %7, 3
%9 = add nsw i32 %8, 6
br label %3
}
unsigned long hash_gd2(char *uri) {
  unsigned long hash = 0;
  int c;
  while ((c = *uri++)) {
    if (c == '?' || c == '\n')
      break;
    hash = c + (hash << 6) + (hash << 16) - hash;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_gd2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     116e <hash_gd2+0x6e>
cmpl   $0x3f,-0x14(%rbp)
je     1142 <hash_gd2+0x42>
cmpl   $0xa,-0x14(%rbp)
jne    1147 <hash_gd2+0x47>
jmp    116e <hash_gd2+0x6e>
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_gd2+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_gd2>:
xor    %eax,%eax
movabs $0x8000000000000401,%rcx
jmp    1122 <hash_gd2+0x22>
xchg   %ax,%ax
movsbq %dl,%rdx
add    $0x1,%rdi
imul   $0x1003f,%rax,%rax
add    %rdx,%rax
movzbl (%rdi),%edx
cmp    $0x3f,%rdx
ja     1110 <hash_gd2+0x10>
bt     %rdx,%rcx
jae    1110 <hash_gd2+0x10>
ret

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

LLVM IR (-O2):
define i64 @hash_gd2(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ 0, %1 ], [ %10, %6 ]
%4 = phi i8* [ %0, %1 ], [ %7, %6 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %11
i8 63, label %11
i8 10, label %11
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = sext i8 %5 to i64
%9 = mul i64 %3, 65599
%10 = add i64 %9, %8
br label %2
11: ; preds = %2, %2, %2
ret i64 %3
}
/* Type definitions */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
unsigned int time_us(const struct timeval t) {
  return (unsigned int)(t.tv_sec * 1000000 + t.tv_usec);
}


x86 assembly (clang, -O0):
<time_us>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_us>:
imul   $0xf4240,%edi,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @time_us(i32 %0, i64 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to { i32, i64 }*
%5 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %4, i32 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %4, i32 0, i32 1
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 1000000
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%12 = load i64, i64* %11
%13 = add nsw i64 %10, %12
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @time_us(i32 %0, i64 %1) {
%3 = mul nsw i32 %0, 1000000
%4 = trunc i64 %1 to i32
%5 = add i32 %3, %4
ret i32 %5
}
int datum_a(const unsigned char source[], int position, int length) {
  int retval = 0;
  if (position < length) {
    if (source[position] <= 95) {
      retval = 1;
    }
  }
  return retval;
}


x86 assembly (clang, -O0):
<datum_a>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1142 <datum_a+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x5f,%eax
jg     113d <datum_a+0x3d>
movl   $0x1,-0x14(%rbp)
jmp    1142 <datum_a+0x42>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<datum_a>:
xor    %eax,%eax
cmp    %edx,%esi
jge    1112 <datum_a+0x12>
movslq %esi,%rcx
xor    %eax,%eax
cmpb   $0x60,(%rdi,%rcx,1)
setb   %al
ret

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

LLVM IR (-O2):
define i32 @datum_a(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp ult i8 %8, 96
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %5, %3
%12 = phi i32 [ 0, %3 ], [ %10, %5 ]
ret i32 %12
}
/* Variables and functions */
int sdeco_get();
int sdeco_d_get_uint16(void) {
  int h;
  unsigned int val;
  h = sdeco_get();
  if (h < 0)
    return h;
  val = (h << 8);
  h = sdeco_get();
  if (h < 0)
    return h;
  return val + h;
}


x86 assembly (clang, -O0):
<sdeco_d_get_uint16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <sdeco_get@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1137 <sdeco_d_get_uint16+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <sdeco_d_get_uint16+0x58>
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <sdeco_get@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    115f <sdeco_d_get_uint16+0x4f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <sdeco_d_get_uint16+0x58>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdeco_d_get_uint16>:
push   %rbx
xor    %eax,%eax
call   1030 <sdeco_get@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1132 <sdeco_d_get_uint16+0x22>
xor    %eax,%eax
call   1030 <sdeco_get@plt>
test   %eax,%eax
js     1130 <sdeco_d_get_uint16+0x20>
shl    $0x8,%ebx
add    %eax,%ebx
jmp    1132 <sdeco_d_get_uint16+0x22>
mov    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @sdeco_d_get_uint16() {
%1 = tail call i32 (...) @sdeco_get()
%2 = icmp slt i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 (...) @sdeco_get()
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = shl i32 %1, 8
%8 = add i32 %4, %7
br label %9
9: ; preds = %3, %0, %6
%10 = phi i32 [ %8, %6 ], [ %1, %0 ], [ %4, %3 ]
ret i32 %10
}
int test_bitAnd(int x, int y) { return x & y; }


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

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

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

LLVM IR (-O2):
define i32 @test_bitAnd(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ read(int, float *, int);
void read_float_(float *z, int *fd) { read(*fd, z, sizeof(float)); }


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

x86 assembly (clang, -O2):
<read_float_>:
mov    %rdi,%rax
mov    (%rsi),%edi
mov    %rax,%rsi
mov    $0x4,%edx
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define void @read_float_(float* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @read(i32 %3, float* %0, i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ set_rounding(int /*<<< orphan*/ const *);
void cvt_s_d(const uint32_t *fcr31, const double *source, float *dest) {
  set_rounding(fcr31);
  *dest = (float)*source;
}


x86 assembly (clang, -O0):
<cvt_s_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <set_rounding@plt>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvt_s_d>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <set_rounding@plt>
movsd  (%rbx),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @cvt_s_d(i32* %0, double* %1, float* %2) {
%4 = alloca i32*
%5 = alloca double*
%6 = alloca float*
store i32* %0, i32** %4
store double* %1, double** %5
store float* %2, float** %6
%7 = load i32*, i32** %4
%8 = call i32 @set_rounding(i32* %7)
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = fptrunc double %10 to float
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @cvt_s_d(i32* %0, double* nocapture %1, float* nocapture writeonly %2) {
%4 = tail call i32 @set_rounding(i32* %0)
%5 = load double, double* %1
%6 = fptrunc double %5 to float
store float %6, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fill_one_span_write(unsigned char *, unsigned char *);
int /*<<< orphan*/ strcmp(char *, char *);
int fill_cache_write(unsigned char *start_ptr, unsigned char *end_ptr,
                     char *resctrl_val) {
  while (1) {
    fill_one_span_write(start_ptr, end_ptr);
    if (!strcmp(resctrl_val, "cat"))
      break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fill_cache_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fill_one_span_write@plt>
mov    -0x18(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    115f <fill_cache_write+0x3f>
jmp    1164 <fill_cache_write+0x44>
jmp    1134 <fill_cache_write+0x14>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_cache_write>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xec8(%rip),%r12
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <fill_one_span_write@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1140 <fill_cache_write+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"cat\00"
define i32 @fill_cache_write(i8* %0, i8* %1, i8* nocapture %2) {
br label %4
4: ; preds = %4, %3
%5 = tail call i32 @fill_one_span_write(i8* %0, i8* %1)
%6 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x30() {
  Assert_real((isalpha(48) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              245, ("isalpha should be 0 for 0"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x30>:
push   %rbp
mov    %rsp,%rbp
mov    $0x30,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xf5,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x30>:
push   %rax
mov    $0x30,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xf5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 0\00"
define void @t_isalpha_0x30() {
%1 = call i64 @isalpha(i32 48)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 245, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for 0\00"
define void @t_isalpha_0x30() {
%1 = tail call i64 @isalpha(i32 48)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 245, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct yaffs_obj {
  int dummy;
};

/* Variables and functions */
int yaffs_do_removexattr_reldir(struct yaffs_obj *, char const *, char const *,
                                int);
int yaffs_removexattr_reldir(struct yaffs_obj *reldir, const char *path,
                             const char *name) {
  return yaffs_do_removexattr_reldir(reldir, path, name, 1);
}


x86 assembly (clang, -O0):
<yaffs_removexattr_reldir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <yaffs_do_removexattr_reldir@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_removexattr_reldir>:
mov    $0x1,%ecx
jmp    1030 <yaffs_do_removexattr_reldir@plt>

LLVM IR (-O0):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_removexattr_reldir(%struct.yaffs_obj* %0, i8* %1, i8* %2) {
%4 = alloca %struct.yaffs_obj*
%5 = alloca i8*
%6 = alloca i8*
store %struct.yaffs_obj* %0, %struct.yaffs_obj** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.yaffs_obj*, %struct.yaffs_obj** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @yaffs_do_removexattr_reldir(%struct.yaffs_obj* %7, i8* %8, i8* %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_removexattr_reldir(%struct.yaffs_obj* %0, i8* %1, i8* %2) {
%4 = tail call i32 @yaffs_do_removexattr_reldir(%struct.yaffs_obj* %0, i8* %1, i8* %2, i32 1)
ret i32 %4
}
tftpgetusage(s) char *s;
{
  printf("usage: %s host:file host:file ... file, or\n", s);
  printf("       %s file file ... file if connected\n", s);
}


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

x86 assembly (clang, -O2):
<tftpgetusage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"usage: %s host:file host:file ... file, or\0A\00"
@.str.1 = [43 x i8] c" %s file file ... file if connected\0A\00"
define i32 @tftpgetusage(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [44 x i8] c"usage: %s host:file host:file ... file, or\0A\00"
@.str.1 = [43 x i8] c" %s file file ... file if connected\0A\00"
define i32 @tftpgetusage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 undef
}
void inc_boost_req_count(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_boost_req_count() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int test1_exit(int ec) {
  exit(ec);
  return (0);
}


x86 assembly (clang, -O0):
<test1_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<test1_exit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define i32 @test1_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ timer_t;

/* Variables and functions */
int timer_delete(int /*<<< orphan*/ *);
int main(void) {
  timer_t timerid = 0;
  return timer_delete(&timerid);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <timer_delete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <timer_delete@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @timer_delete(i32* %1)
ret i32 %3
}
/* Type definitions */
struct cpufreq_policy {
  int dummy;
};

/* Variables and functions */
struct cpufreq_policy *sysfs_get_policy(unsigned int cpu) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.cpufreq_policy = type { i32 }
define %struct.cpufreq_policy* @sysfs_get_policy(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret %struct.cpufreq_policy* null
}

LLVM IR (-O2):
%struct.cpufreq_policy = type { i32 }
define noalias %struct.cpufreq_policy* @sysfs_get_policy(i32 %0) {
ret %struct.cpufreq_policy* null
}
int isValid(char a, char b) { return a == '1' || (a == '2' && b < '7'); }


x86 assembly (clang, -O0):
<isValid>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x31,%ecx
mov    %al,-0x3(%rbp)
je     1147 <isValid+0x47>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x32,%ecx
mov    %al,-0x4(%rbp)
jne    1141 <isValid+0x41>
movsbl -0x2(%rbp),%eax
cmp    $0x37,%eax
setl   %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValid>:
cmp    $0x31,%dil
sete   %al
cmp    $0x32,%dil
sete   %cl
cmp    $0x37,%sil
setl   %dl
and    %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @isValid(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 49
br i1 %7, label %18, label %8
8: ; preds = %2
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 50
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp slt i32 %14, 55
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
br label %18
18: ; preds = %16, %2
%19 = phi i1 [ true, %2 ], [ %17, %16 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @isValid(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 49
%4 = icmp eq i8 %0, 50
%5 = icmp slt i8 %1, 55
%6 = and i1 %4, %5
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ start_microaccounting();
void Cilk_arch_specific_per_worker_init(void) { start_microaccounting(); }


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

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

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

LLVM IR (-O2):
define void @Cilk_arch_specific_per_worker_init() {
%1 = tail call i32 (...) @start_microaccounting()
ret void
}
int tdefault_supports_non_stop(struct target_ops *self) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define i32 @tdefault_supports_non_stop(%struct.target_ops* nocapture readnone %0) {
ret i32 0
}
float num_min(float a, float b) { return a > b ? b : a; }


x86 assembly (clang, -O0):
<num_min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <num_min+0x2c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <num_min+0x36>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_min>:
minss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @num_min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %4
br label %12
10: ; preds = %2
%11 = load float, float* %3
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @num_min(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %1, float %0
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ htobe64(int /*<<< orphan*/);
__attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }


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

x86 assembly (clang, -O2):
<htonll>:
jmp    1030 <htobe64@plt>

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

LLVM IR (-O2):
define i32 @htonll(i32 %0) {
%2 = tail call i32 @htobe64(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ RESET_FF_SaveConfig();
void RESET_FF_Sleep(void) { RESET_FF_SaveConfig(); }


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

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

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

LLVM IR (-O2):
define void @RESET_FF_Sleep() {
%1 = tail call i32 (...) @RESET_FF_SaveConfig()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void grab_sector(void *cart_loc, void *ram_loc) {
  memcpy(ram_loc, cart_loc, 256);
}


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

x86 assembly (clang, -O2):
<grab_sector>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x100,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @grab_sector(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %1, i8* %0, i32 256)
ret void
}
int fn8(char *x[]) { return sizeof x; }


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

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

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

LLVM IR (-O2):
define i32 @fn8(i8** nocapture readnone %0) {
ret i32 8
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int /*<<< orphan*/ tolower(int);
int main(void) {
  int ch;
  while ((ch = getchar()) != EOF)
    putchar(tolower(ch));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116c <main+0x3c>
mov    -0x8(%rbp),%edi
call   1050 <tolower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    113f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2ea9(%rip),%rbx
cmp    (%rbx),%eax
je     1169 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1050 <tolower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i32 @tolower(i32 %5)
%7 = tail call i32 @putchar(i32 %6)
%8 = tail call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret i32 0
}
int RightJust_str(char *fmt_str, char *from_str, char *to_str) {
  int num_of_S = count_chars('S', fmt_str);
  sprintf(to_str, "%*s", num_of_S, from_str);
  return num_of_S;
}


x86 assembly (clang, -O0):
<RightJust_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x53,%edi
mov    $0x0,%al
call   1030 <count_chars@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xea7(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RightJust_str>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%rsi
mov    $0x53,%edi
xor    %eax,%eax
call   1030 <count_chars@plt>
mov    %eax,%ebp
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%*s\00"
define i32 @RightJust_str(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @count_chars to i32 (i32, i8*, ...)*)(i32 83, i8* %8)
store i32 %9, i32* %7
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %5
%13 = call i32 (i8*, i8*, ...) @sprintf(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11, i8* %12)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*s\00"
define i32 @RightJust_str(i8* %0, i8* %1, i8* nocapture writeonly %2) {
%4 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @count_chars to i32 (i32, i8*, ...)*)(i32 83, i8* %0)
%5 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, int);
void Move_Ret_To_Foreign_D(int index) {
  Inst_Printf("std", "%%f0,[%%l3+%d]", index * 8);
}


x86 assembly (clang, -O0):
<Move_Ret_To_Foreign_D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
shl    $0x3,%edx
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Move_Ret_To_Foreign_D>:
lea    0x0(,%rdi,8),%edx
lea    0xee2(%rip),%rdi
lea    0xedf(%rip),%rsi
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"std\00"
@.str.1 = [15 x i8] c"%%f0,[%%l3+%d]\00"
define void @Move_Ret_To_Foreign_D(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 8
%5 = call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"std\00"
@.str.1 = [15 x i8] c"%%f0,[%%l3+%d]\00"
define void @Move_Ret_To_Foreign_D(i32 %0) {
%2 = shl nsw i32 %0, 3
%3 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
double fmod(double, double);
double regModAngle(double ang) {
  double angle;
  angle = fmod(ang, 360.0);
  if (angle < 0.0)
    angle += 360.0;
  return angle;
}


x86 assembly (clang, -O0):
<regModAngle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1154 <regModAngle+0x44>
movsd  0xeb6(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regModAngle>:
push   %rax
movsd  0xee7(%rip),%xmm1
call   1030 <fmod@plt>
movsd  0xeda(%rip),%xmm3
addsd  %xmm0,%xmm3
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
cmpltsd %xmm2,%xmm1
andpd  %xmm1,%xmm3
andnpd %xmm0,%xmm1
orpd   %xmm3,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @regModAngle(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @fmod(double %4, double 3.600000e+02)
store double %5, double* %3
%6 = load double, double* %3
%7 = fcmp olt double %6, 0.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fadd double %9, 3.600000e+02
store double %10, double* %3
br label %11
11: ; preds = %8, %1
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @regModAngle(double %0) {
%2 = tail call double @fmod(double %0, double 3.600000e+02)
%3 = fcmp olt double %2, 0.000000e+00
%4 = fadd double %2, 3.600000e+02
%5 = select i1 %3, double %4, double %2
ret double %5
}
void uninit_kips() {}


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

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

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

LLVM IR (-O2):
define void @uninit_kips() {
ret void
}
const char *getSpec(void) { return "typ_spec { name=typ_LfoType; }"; }


x86 assembly (clang, -O0):
<getSpec>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSpec>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [31 x i8] c"typ_spec { name=typ_LfoType; }\00"
define i8* @getSpec() {
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [31 x i8] c"typ_spec { name=typ_LfoType; }\00"
define i8* @getSpec() {
ret i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char *strdup(char const *);
char *lex_postag_new(const char *p) { return (strdup(p)); }


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

x86 assembly (clang, -O2):
<lex_postag_new>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @lex_postag_new(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}