xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_multprec_container_to_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(284, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_multprec_container_to_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x11c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_multprec_container_to_start_system>:
mov    $0x11c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_multprec_container_to_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 284, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_multprec_container_to_start_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 284, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void CheckPointer(void *p, char *name) {
  if (p == NULL) {
    fprintf(stderr, "Error in fft_float():  %s == NULL\n", name);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<CheckPointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115e <CheckPointer+0x3e>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckPointer>:
test   %rdi,%rdi
je     1126 <CheckPointer+0x6>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Error in fft_float(): %s == NULL\0A\00"
define void @CheckPointer(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Error in fft_float(): %s == NULL\0A\00"
define void @CheckPointer(i8* readnone %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %1)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
int func() { return 2; }


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

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

LLVM IR (-O0):
define i32 @func() {
ret i32 2
}

LLVM IR (-O2):
define i32 @func() {
ret i32 2
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t _byteswap64(uint64_t x) {
  uint32_t a = x >> 32;
  uint32_t b = (uint32_t)x;
  return ((uint64_t)((((((b)) >> (8)) | (((b)) << (32 - (8)))) & 0xff00ff00L) |
                     (((((b)) << (8)) | (((b)) >> (32 - (8)))) & 0x00ff00ffL))
          << 32) |
         (uint64_t)((((((a)) >> (8)) | (((a)) << (32 - (8)))) & 0xff00ff00L) |
                    (((((a)) << (8)) | (((a)) >> (32 - (8)))) & 0x00ff00ffL));
}


x86 assembly (clang, -O0):
<_byteswap64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    -0xc(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
cltq
movabs $0xff00ff00,%rcx
and    %rcx,%rax
mov    -0xc(%rbp),%ecx
shl    $0x8,%ecx
mov    -0xc(%rbp),%edx
sar    $0x18,%edx
or     %edx,%ecx
movslq %ecx,%rcx
and    $0xff00ff,%rcx
or     %rcx,%rax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%edx
shl    $0x18,%edx
or     %edx,%ecx
movslq %ecx,%rcx
movabs $0xff00ff00,%rdx
and    %rdx,%rcx
mov    -0x8(%rbp),%edx
shl    $0x8,%edx
mov    -0x8(%rbp),%esi
sar    $0x18,%esi
or     %esi,%edx
movslq %edx,%rdx
and    $0xff00ff,%rdx
or     %rdx,%rcx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_byteswap64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 32
store i32 %6, i32* %3
%7 = load i32, i32* %2
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = ashr i32 %8, 8
%10 = load i32, i32* %4
%11 = shl i32 %10, 24
%12 = or i32 %9, %11
%13 = sext i32 %12 to i64
%14 = and i64 %13, 4278255360
%15 = load i32, i32* %4
%16 = shl i32 %15, 8
%17 = load i32, i32* %4
%18 = ashr i32 %17, 24
%19 = or i32 %16, %18
%20 = sext i32 %19 to i64
%21 = and i64 %20, 16711935
%22 = or i64 %14, %21
%23 = trunc i64 %22 to i32
%24 = shl i32 %23, 32
%25 = load i32, i32* %3
%26 = ashr i32 %25, 8
%27 = load i32, i32* %3
%28 = shl i32 %27, 24
%29 = or i32 %26, %28
%30 = sext i32 %29 to i64
%31 = and i64 %30, 4278255360
%32 = load i32, i32* %3
%33 = shl i32 %32, 8
%34 = load i32, i32* %3
%35 = ashr i32 %34, 24
%36 = or i32 %33, %35
%37 = sext i32 %36 to i64
%38 = and i64 %37, 16711935
%39 = or i64 %31, %38
%40 = trunc i64 %39 to i32
%41 = or i32 %24, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @_byteswap64(i32 %0) {
ret i32 poison
}
void ikrandm_(double *ikchk, double *ikran) {
  unsigned long *likchk;
  unsigned long long *llikchk;
  if (sizeof(long long) > sizeof(double)) {
    likchk = (unsigned long *)ikchk;
    *likchk -= *(unsigned long *)ikran;
  } else {
    llikchk = (unsigned long long *)ikchk;
    *llikchk -= *(unsigned long long *)ikran;
  }
}


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

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

LLVM IR (-O0):
define void @ikrandm_(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i64*
%6 = alloca i64*
store double* %0, double** %3
store double* %1, double** %4
%7 = load double*, double** %3
%8 = bitcast double* %7 to i64*
store i64* %8, i64** %6
%9 = load double*, double** %4
%10 = bitcast double* %9 to i64*
%11 = load i64, i64* %10
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = sub i64 %13, %11
store i64 %14, i64* %12
ret void
}

LLVM IR (-O2):
define void @ikrandm_(double* nocapture %0, double* nocapture %1) {
%3 = bitcast double* %0 to i64*
%4 = bitcast double* %1 to i64*
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = sub i64 %6, %5
store i64 %7, i64* %3
ret void
}
int memmap_valid_within(unsigned long pfn, struct page *page,
                        struct zone *zone) {
  return 1;
}


x86 assembly (clang, -O0):
<memmap_valid_within>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.page = type opaque
%struct.zone = type opaque
define i32 @memmap_valid_within(i64 %0, %struct.page* %1, %struct.zone* %2) {
%4 = alloca i64
%5 = alloca %struct.page*
%6 = alloca %struct.zone*
store i64 %0, i64* %4
store %struct.page* %1, %struct.page** %5
store %struct.zone* %2, %struct.zone** %6
ret i32 1
}

LLVM IR (-O2):
%struct.page = type opaque
%struct.zone = type opaque
define i32 @memmap_valid_within(i64 %0, %struct.page* nocapture readnone %1, %struct.zone* nocapture readnone %2) {
ret i32 1
}
/* Variables and functions */
char *itoa_w(int, int);
char *itoa7(int val) { return itoa_w(val, 7); }


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

x86 assembly (clang, -O2):
<itoa7>:
mov    $0x7,%esi
jmp    1030 <itoa_w@plt>

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

LLVM IR (-O2):
define i8* @itoa7(i32 %0) {
%2 = tail call i8* @itoa_w(i32 %0, i32 7)
ret i8* %2
}
void yydestruct(const char *yymsg, int yytype, char **yyvaluep) {
  ((void)(yyvaluep));
  if (!yymsg)
    yymsg = "Deleting";
  ;
  switch (yytype) {
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<yydestruct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1125 <yydestruct+0x25>
lea    0xedf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <yydestruct+0x2a>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @yydestruct(i8* nocapture %0, i32 %1, i8** nocapture %2) {
ret void
}
void Call(void *Funcion, int *ParamVector, int ParamCount) {
  void (*Function)(void) = Funcion;
  int ParamTemp = ParamCount;
  ParamVector += ParamCount;
  while (ParamTemp > 0) {
    ParamVector--;
    ParamTemp--;
    *ParamVector = 0;
  }
  Function();
}


x86 assembly (clang, -O0):
<Call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x24(%rbp)
jle    1164 <Call+0x64>
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1136 <Call+0x36>
call   *-0x20(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Call>:
test   %edx,%edx
jle    1139 <Call+0x29>
push   %rbx
mov    %edx,%eax
add    $0xffffffff,%edx
not    %rdx
add    %rax,%rdx
mov    %rdi,%rbx
lea    (%rsi,%rdx,4),%rdi
shl    $0x2,%rax
xor    %esi,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    *%rdi

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

LLVM IR (-O2):
define void @Call(i8* nocapture %0, i32* nocapture writeonly %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
%7 = add nsw i32 %2, -1
%8 = zext i32 %7 to i64
%9 = xor i64 %8, -1
%10 = add nsw i64 %9, %6
%11 = getelementptr i32, i32* %1, i64 %10
%12 = bitcast i32* %11 to i8*
%13 = zext i32 %2 to i64
%14 = shl nuw nsw i64 %13, 2
br label %15
15: ; preds = %5, %3
%16 = bitcast i8* %0 to void ()*
tail call void %16()
ret void
}
long seq(long a) {
  long count = 0;
  while (a > 0) {
    if (a == 1) {
      break;
    }
    a = (a % 2 == 0) ? a / 2 : (3 * a) + 1;
    count++;
  }
  return ++count;
}


x86 assembly (clang, -O0):
<seq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1180 <seq+0x80>
cmpq   $0x1,-0x8(%rbp)
jne    112b <seq+0x2b>
jmp    1180 <seq+0x80>
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    115a <seq+0x5a>
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
jmp    1167 <seq+0x67>
imul   $0x3,-0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <seq+0x10>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq>:
mov    $0x1,%eax
cmp    $0x2,%rdi
jl     112d <seq+0x2d>
mov    $0x1,%eax
mov    %rdi,%rcx
shr    %rcx
test   $0x1,%dil
lea    0x1(%rdi,%rdi,2),%rdi
cmove  %rcx,%rdi
add    $0x1,%rax
cmp    $0x1,%rdi
jg     1110 <seq+0x10>
ret

LLVM IR (-O0):
define i64 @seq(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %22, %1
%5 = load i64, i64* %2
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %26
7: ; preds = %4
%8 = load i64, i64* %2
%9 = icmp eq i64 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
br label %26
11: ; preds = %7
%12 = load i64, i64* %2
%13 = srem i64 %12, 2
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i64, i64* %2
%17 = sdiv i64 %16, 2
br label %22
18: ; preds = %11
%19 = load i64, i64* %2
%20 = mul nsw i64 3, %19
%21 = add nsw i64 %20, 1
br label %22
22: ; preds = %18, %15
%23 = phi i64 [ %17, %15 ], [ %21, %18 ]
store i64 %23, i64* %2
%24 = load i64, i64* %3
%25 = add nsw i64 %24, 1
store i64 %25, i64* %3
br label %4
26: ; preds = %10, %4
%27 = load i64, i64* %3
%28 = add nsw i64 %27, 1
store i64 %28, i64* %3
ret i64 %28
}

LLVM IR (-O2):
define i64 @seq(i64 %0) {
%2 = icmp slt i64 %0, 2
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %12, %3 ], [ 1, %1 ]
%5 = phi i64 [ %11, %3 ], [ %0, %1 ]
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
%8 = lshr i64 %5, 1
%9 = mul nsw i64 %5, 3
%10 = add nsw i64 %9, 1
%11 = select i1 %7, i64 %8, i64 %10
%12 = add i64 %4, 1
%13 = icmp slt i64 %11, 2
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi i64 [ 1, %1 ], [ %12, %3 ]
ret i64 %15
}
void inc_zcache_flobj_total(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_flobj_total() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
__attribute__((__weak__, __always___)) void softboundmpx_perror(const char *s) {
  perror(s);
}


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

x86 assembly (clang, -O2):
<softboundmpx_perror>:
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
define weak void @softboundmpx_perror(i8* %0) {
%2 = tail call i32 @perror(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isdigit(int);
int isalnum(int ch) {
  if (isalpha(ch) || isdigit(ch))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
jne    114f <isalnum+0x2f>
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     115b <isalnum+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <isalnum+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isdigit(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int cbmarch_raw_read(int, void *, size_t);
int cbm_raw_read(int HandleDevice, void *Buffer, size_t Count) {
  int bytesRead;
  ;
  bytesRead = cbmarch_raw_read(HandleDevice, Buffer, Count);
  return bytesRead;
}


x86 assembly (clang, -O0):
<cbm_raw_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <cbmarch_raw_read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbm_raw_read>:
jmp    1030 <cbmarch_raw_read@plt>

LLVM IR (-O0):
define i32 @cbm_raw_read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @cbmarch_raw_read(i32 %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @cbm_raw_read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @cbmarch_raw_read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int getStart(char *line, char *result) {
  int start;
  char *first;
  char *g_index;
  first = line;
  g_index = result;
  start = g_index - first;
  printf("\nThe pattern starts at index: %d\n", start);
}


x86 assembly (clang, -O0):
<getStart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"\0AThe pattern starts at index: %d\0A\00"
define i32 @getStart(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%9 = load i8*, i8** %4
store i8* %9, i8** %7
%10 = load i8*, i8** %5
store i8* %10, i8** %8
%11 = load i8*, i8** %8
%12 = load i8*, i8** %7
%13 = ptrtoint i8* %11 to i64
%14 = ptrtoint i8* %12 to i64
%15 = sub i64 %13, %14
%16 = trunc i64 %15 to i32
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [34 x i8] c"\0AThe pattern starts at index: %d\0A\00"
define i32 @getStart(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 undef
}
/* Variables and functions */
char *foo();
void f2() {
  char *p = foo();
  ++p;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f2() {
%1 = alloca i8*
%2 = call i8* (...) @foo()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8, i8* %3, i32 1
store i8* %4, i8** %1
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i8* (...) @foo()
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
void skip_whitespace_var(char **parsebuf) {
  while (**parsebuf && isspace(**parsebuf))
    (*parsebuf)++;
}


x86 assembly (clang, -O0):
<skip_whitespace_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     114d <skip_whitespace_var+0x3d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115d <skip_whitespace_var+0x4d>
jmp    1170 <skip_whitespace_var+0x60>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <skip_whitespace_var+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace_var>:
push   %rbx
mov    (%rdi),%rax
mov    (%rax),%al
test   %al,%al
je     113f <skip_whitespace_var+0x2f>
mov    %rdi,%rbx
nopl   (%rax)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     113f <skip_whitespace_var+0x2f>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movzbl 0x1(%rax),%eax
test   %al,%al
jne    1120 <skip_whitespace_var+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @skip_whitespace_var(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %9
%6 = phi i8 [ %12, %9 ], [ %3, %1 ]
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = load i8*, i8** %0
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %0
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %9, %1
ret void
}
/* Variables and functions */
char *rindex(char *, char);
char *basename(char *name) {
  char *base;
  base = rindex(name, '/');
  return (base ? base + 1 : name);
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <rindex@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <rindex@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @rindex(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = tail call i8* @rindex(i8* %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void walt_set_window_start(struct rq *rq) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
define void @walt_set_window_start(%struct.rq* nocapture %0) {
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t DDI32RegRead(uint32_t ui32Base, uint32_t ui32Reg) {
  ;
  ;
  return ((*((volatile unsigned long *)(ui32Base + ui32Reg))));
}


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

x86 assembly (clang, -O2):
<DDI32RegRead>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x8(%rsp),%rax
mov    -0x10(%rsp),%rcx
mov    (%rcx,%rax,1),%rax
ret

LLVM IR (-O0):
define i64 @DDI32RegRead(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %3
%6 = load volatile i64, i64* %4
%7 = add i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @DDI32RegRead(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %3
%6 = load volatile i64, i64* %4
%7 = add i64 %6, %5
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Variables and functions */
unsigned int SIGRTMAX;
scalar_t__ *sys_siglist;
char *strsignal(int sig) {
  if ((unsigned int)sig <= SIGRTMAX)
    return (char *)sys_siglist[sig];
  else
    return (char *)"(unknown signal)";
}


x86 assembly (clang, -O0):
<strsignal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ec7(%rip),%rcx
cmp    (%rcx),%eax
ja     1134 <strsignal+0x34>
mov    0x2ec8(%rip),%rax
mov    (%rax),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
jmp    113f <strsignal+0x3f>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsignal>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jae    1113 <strsignal+0x13>
lea    0xeee(%rip),%rax
ret
mov    0x2ece(%rip),%rax
mov    (%rax),%rax
movslq %edi,%rcx
mov    (%rax,%rcx,8),%rax
ret

LLVM IR (-O0):
@SIGRTMAX = global i32 0
@sys_siglist = global i64* null
@.str = [17 x i8] c"(unknown signal)\00"
define i8* @strsignal(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @SIGRTMAX
%6 = icmp ule i32 %4, %5
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i64*, i64** @sys_siglist
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %8, i64 %10
%12 = load i64, i64* %11
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %2
br label %15
14: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %2
br label %15
15: ; preds = %14, %7
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@SIGRTMAX = global i32 0
@sys_siglist = global i64* null
@.str = [17 x i8] c"(unknown signal)\00"
define i8* @strsignal(i32 %0) {
%2 = load i32, i32* @SIGRTMAX
%3 = icmp ult i32 %2, %0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = load i64*, i64** @sys_siglist
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds i64, i64* %5, i64 %6
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i8*
br label %10
10: ; preds = %1, %4
%11 = phi i8* [ %9, %4 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ set_linux_file_name(char *);
int /*<<< orphan*/ tcp_vegas_register();
void module_register(void) {
  tcp_vegas_register();
  set_linux_file_name("tcp_vegas.c");
}


x86 assembly (clang, -O0):
<module_register>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tcp_vegas_register@plt>
lea    0xece(%rip),%rdi
call   1040 <set_linux_file_name@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_register>:
push   %rax
xor    %eax,%eax
call   1030 <tcp_vegas_register@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <set_linux_file_name@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tcp_vegas.c\00"
define void @module_register() {
%1 = call i32 (...) @tcp_vegas_register()
%2 = call i32 @set_linux_file_name(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tcp_vegas.c\00"
define void @module_register() {
%1 = tail call i32 (...) @tcp_vegas_register()
%2 = tail call i32 @set_linux_file_name(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadReaction(int);
int indigoReadFile(char const *);
__attribute__((visibility("default"))) int
indigoLoadReactionFromFile(const char *filename) {
  int source = indigoReadFile(filename);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadReaction(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadReactionFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <indigoReadFile@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115e <indigoLoadReactionFromFile+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <indigoLoadReactionFromFile+0x47>
mov    -0x14(%rbp),%edi
call   1050 <indigoLoadReaction@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <indigoFree@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadReactionFromFile>:
push   %rbp
push   %rbx
push   %rax
call   1030 <indigoReadFile@plt>
test   %eax,%eax
jle    1152 <indigoLoadReactionFromFile+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <indigoLoadReaction@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadReactionFromFile+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @indigoLoadReactionFromFile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @indigoReadFile(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @indigoLoadReaction(i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @indigoFree(i32 %14)
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @indigoLoadReactionFromFile(i8* %0) {
%2 = tail call i32 @indigoReadFile(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @indigoLoadReaction(i32 %2)
%6 = tail call i32 @indigoFree(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ f(double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, double *);
int main(int argc, const char *argv[]) {
  double n;
  scanf("%lf", &n);
  printf("%.2lf\n", f(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
call   1030 <f@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1030 <f@plt>
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%8 = load double, double* %6
%9 = call i32 @f(double %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
%7 = call i32 @f(double %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t lsli1(uint32_t x) { return x << 1; }


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

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

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

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

/* Variables and functions */
struct enode *create_enode(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
struct enode *create_enode_func(int type) {
  return create_enode(type, NULL, NULL, 0);
}


x86 assembly (clang, -O0):
<create_enode_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
mov    %rdx,%rsi
call   1030 <create_enode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_enode_func>:
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <create_enode@plt>

LLVM IR (-O0):
%struct.enode = type { i32 }
define %struct.enode* @create_enode_func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.enode* @create_enode(i32 %3, i32* null, i32* null, i32 0)
ret %struct.enode* %4
}

LLVM IR (-O2):
%struct.enode = type { i32 }
define %struct.enode* @create_enode_func(i32 %0) {
%2 = tail call %struct.enode* @create_enode(i32 %0, i32* null, i32* null, i32 0)
ret %struct.enode* %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *emalloc(size_t amount) {
  void *v = malloc(amount);
  if (!v) {
    fprintf(stderr, "malloc failed\n");
    exit(EXIT_FAILURE);
  }
  return v;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <emalloc+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <emalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"malloc failed\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @emalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"malloc failed\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @emalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
int ld_blg_mm1(long double *a1, long double *a2) {
  return (__builtin_islessgreater(*a1, *a2));
}


x86 assembly (clang, -O0):
<ld_blg_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blg_mm1>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setne  %al
ret

LLVM IR (-O0):
define i32 @ld_blg_mm1(x86_fp80* %0, x86_fp80* %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp one x86_fp80 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_blg_mm1(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp one x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void HDumpGraf(char *fname) {}


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

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

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

LLVM IR (-O2):
define void @HDumpGraf(i8* nocapture %0) {
ret void
}
int itoa_length(n)
int n;
{
  int result = 1;
  if (n < 0) {
    n = -n;
    result++;
  }
  while (n >= 10) {
    result++;
    n /= 10;
  }
  return result;
}


x86 assembly (clang, -O0):
<itoa_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1129 <itoa_length+0x29>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <itoa_length+0x2e>
cmpl   $0xa,-0x4(%rbp)
jl     1154 <itoa_length+0x54>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    112e <itoa_length+0x2e>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa_length>:
mov    %edi,%eax
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
shr    $0x1f,%eax
add    $0x1,%eax
cmp    $0xa,%ecx
jb     1134 <itoa_length+0x34>
mov    $0xcccccccd,%edx
nopl   0x0(%rax)
add    $0x1,%eax
mov    %ecx,%esi
imul   %rdx,%rsi
shr    $0x23,%rsi
cmp    $0x63,%ecx
mov    %esi,%ecx
ja     1120 <itoa_length+0x20>
ret

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

LLVM IR (-O2):
define i32 @itoa_length(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = sub nsw i32 0, %0
%4 = select i1 %2, i32 %3, i32 %0
%5 = select i1 %2, i32 2, i32 1
%6 = icmp ugt i32 %4, 9
br i1 %6, label %7, label %13
7: ; preds = %1, %7
%8 = phi i32 [ %10, %7 ], [ %5, %1 ]
%9 = phi i32 [ %11, %7 ], [ %4, %1 ]
%10 = add nuw nsw i32 %8, 1
%11 = udiv i32 %9, 10
%12 = icmp ugt i32 %9, 99
br i1 %12, label %7, label %13
13: ; preds = %7, %1
%14 = phi i32 [ %5, %1 ], [ %10, %7 ]
ret i32 %14
}
unsigned int srp_get_idma_addr(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @srp_get_idma_addr() {
ret i32 0
}
void swap_16(unsigned char *src, unsigned char *dst) {
  *dst++ = *(src + 1);
  *dst = *src;
}


x86 assembly (clang, -O0):
<swap_16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_16>:
mov    0x1(%rdi),%al
mov    %al,(%rsi)
mov    (%rdi),%al
mov    %al,0x1(%rsi)
ret

LLVM IR (-O0):
define void @swap_16(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
store i8 %7, i8* %8
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap_16(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %4, i8* %1
%6 = load i8, i8* %0
store i8 %6, i8* %5
ret void
}
/* Variables and functions */
void overflow(int *buffer, size_t buffer_size) { buffer[buffer_size] = 1; }


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

x86 assembly (clang, -O2):
<overflow>:
movl   $0x1,(%rdi,%rsi,4)
ret

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

LLVM IR (-O2):
define void @overflow(i32* nocapture writeonly %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 %1
store i32 1, i32* %3
ret void
}
void ff_hevc_put_hevc_uni_w_qpel_hv48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_hv48_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cspm_wipe_out();
int /*<<< orphan*/ nmfs_wipe_out();
int /*<<< orphan*/ rkpm_wipe_out();
void methods_wipe_out() {
  rkpm_wipe_out();
  cspm_wipe_out();
  nmfs_wipe_out();
}


x86 assembly (clang, -O0):
<methods_wipe_out>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rkpm_wipe_out@plt>
mov    $0x0,%al
call   1040 <cspm_wipe_out@plt>
mov    $0x0,%al
call   1050 <nmfs_wipe_out@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<methods_wipe_out>:
push   %rax
xor    %eax,%eax
call   1030 <rkpm_wipe_out@plt>
xor    %eax,%eax
call   1040 <cspm_wipe_out@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <nmfs_wipe_out@plt>

LLVM IR (-O0):
define void @methods_wipe_out() {
%1 = call i32 (...) @rkpm_wipe_out()
%2 = call i32 (...) @cspm_wipe_out()
%3 = call i32 (...) @nmfs_wipe_out()
ret void
}

LLVM IR (-O2):
define void @methods_wipe_out() {
%1 = tail call i32 (...) @rkpm_wipe_out()
%2 = tail call i32 (...) @cspm_wipe_out()
%3 = tail call i32 (...) @nmfs_wipe_out()
ret void
}
void fooc(int x[volatile 5]) { x[3] = 42; }


x86 assembly (clang, -O0):
<fooc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2a,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fooc>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
movl   $0x2a,0xc(%rax)
ret

LLVM IR (-O0):
define void @fooc(i32* %0) {
%2 = alloca i32*
store volatile i32* %0, i32** %2
%3 = load volatile i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
store i32 42, i32* %4
ret void
}

LLVM IR (-O2):
define void @fooc(i32* %0) {
%2 = alloca i32*
store volatile i32* %0, i32** %2
%3 = load volatile i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
store i32 42, i32* %4
ret void
}
int _gfortran_caf_sync_images(int count __attribute__((unused)),
                              int images[] __attribute__((unused)),
                              char *errmsg __attribute__((unused)),
                              int errmsg_len __attribute__((unused))) {
  return 0;
}


x86 assembly (clang, -O0):
<_gfortran_caf_sync_images>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_gfortran_caf_sync_images(i32 %0, i32* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @_gfortran_caf_sync_images(i32 %0, i32* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}