xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ifc_clear_ipv4_addresses(char const *);
int ifc_clear_ipv6_addresses(char const *);
int ifc_clear_addresses(const char *name) {
  ifc_clear_ipv4_addresses(name);
  return ifc_clear_ipv6_addresses(name);
}


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

x86 assembly (clang, -O2):
<ifc_clear_addresses>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ifc_clear_ipv4_addresses@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <ifc_clear_ipv6_addresses@plt>

LLVM IR (-O0):
define i32 @ifc_clear_addresses(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ifc_clear_ipv4_addresses(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @ifc_clear_ipv6_addresses(i8* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ifc_clear_addresses(i8* %0) {
%2 = tail call i32 @ifc_clear_ipv4_addresses(i8* %0)
%3 = tail call i32 @ifc_clear_ipv6_addresses(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int shonet() {
  printf("\nNo networks are supported in this version of C-Kermit\n");
  return (0);
}


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

x86 assembly (clang, -O2):
<shonet>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"\0ANo networks are supported in this version of C-Kermit\0A\00"
define i32 @shonet() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [55 x i8] c"\0ANo networks are supported in this version of C-Kermit\00"
define i32 @shonet() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void fa52(int n) {
  {
    int b[n];
  a : {
    int c[n];
    0;
  }
    goto a;
    {
      int d[n];
      0;
    };
    int e[n];
    0;
  };
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa52>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
jmp    111c <fa52+0x1c>

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

LLVM IR (-O0):
define void @fa52(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %3
%22 = alloca i32, i64 %20
store i64 %20, i64* %4
br label %23
23: ; preds = %23, %1
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
%26 = call i8* @llvm.stacksave()
store i8* %26, i8** %5
%27 = alloca i32, i64 %25
store i64 %25, i64* %6
%28 = load i8*, i8** %5
br label %23
29: ; No predecessors!
%30 = load i32, i32* %2
%31 = zext i32 %30 to i64
%32 = call i8* @llvm.stacksave()
store i8* %32, i8** %7
%33 = alloca i32, i64 %31
store i64 %31, i64* %8
%34 = load i8*, i8** %7
%35 = load i32, i32* %2
%36 = zext i32 %35 to i64
%37 = alloca i32, i64 %36
store i64 %36, i64* %9
%38 = load i8*, i8** %3
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %10
%42 = alloca i32, i64 %40
store i64 %40, i64* %11
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
%45 = call i8* @llvm.stacksave()
store i8* %45, i8** %12
%46 = alloca i32, i64 %44
store i64 %44, i64* %13
%47 = load i8*, i8** %12
%48 = load i32, i32* %2
%49 = zext i32 %48 to i64
%50 = call i8* @llvm.stacksave()
store i8* %50, i8** %14
%51 = alloca i32, i64 %49
store i64 %49, i64* %15
%52 = load i8*, i8** %14
%53 = load i32, i32* %2
%54 = zext i32 %53 to i64
%55 = alloca i32, i64 %54
store i64 %54, i64* %16
%56 = load i8*, i8** %10
%57 = load i32, i32* %2
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
store i8* %59, i8** %17
%60 = alloca i32, i64 %58
store i64 %58, i64* %18
%61 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
define void @fa52(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
unsigned equeue_tick(void) {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return (unsigned)(tv.tv_sec * 1000 + tv.tv_usec / 1000);
}


x86 assembly (clang, -O0):
<equeue_tick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equeue_tick>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @equeue_tick() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @equeue_tick() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
ret i32 %10
}
/* Variables and functions */
scalar_t__ EINTR;
int dup2(int, int);
scalar_t__ errno;
void xDup2(int oldFd, int newFd) {
  while (dup2(oldFd, newFd) == -1)
    if (errno != EINTR)
      break;
}


x86 assembly (clang, -O0):
<xDup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
cmp    $0xffffffff,%eax
jne    1156 <xDup2+0x46>
mov    0x2ea7(%rip),%rax
mov    (%rax),%rax
mov    0x2e95(%rip),%rcx
cmp    (%rcx),%rax
je     1151 <xDup2+0x41>
jmp    1156 <xDup2+0x46>
jmp    111e <xDup2+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xDup2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2ebe(%rip),%r14
mov    0x2eaf(%rip),%r15
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <dup2@plt>
cmp    $0xffffffff,%eax
jne    1146 <xDup2+0x36>
mov    (%r14),%rax
cmp    (%r15),%rax
je     1130 <xDup2+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define void @xDup2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %15, %2
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @dup2(i32 %6, i32 %7)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i64, i64* @errno
%12 = load i64, i64* @EINTR
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
br label %16
15: ; preds = %10
br label %5
16: ; preds = %14, %5
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define void @xDup2(i32 %0, i32 %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i32 @dup2(i32 %0, i32 %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
br i1 %9, label %3, label %10
10: ; preds = %6, %3
ret void
}
int fn4(int x, int y) { return x > x ? 1 : 0; }


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn4(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* %3
%7 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
ret i32 0
}
int valid_a_char(char c) {
  return (c >= ' ' && c <= '"') || (c >= '%' && c <= '?') ||
         (c >= 'A' && c <= 'Z') || (c == '_');
}


x86 assembly (clang, -O0):
<valid_a_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jl     1129 <valid_a_char+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x22,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <valid_a_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x25,%eax
jl     1148 <valid_a_char+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3f,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <valid_a_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1167 <valid_a_char+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <valid_a_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_a_char>:
lea    -0x20(%rdi),%eax
cmp    $0x3,%al
setb   %al
lea    -0x25(%rdi),%ecx
cmp    $0x1b,%cl
setb   %cl
or     %al,%cl
lea    -0x41(%rdi),%eax
cmp    $0x1a,%al
setb   %al
cmp    $0x5f,%dil
sete   %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @valid_a_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 32
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 34
br i1 %9, label %30, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 37
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 63
br i1 %17, label %30, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 90
br i1 %25, label %30, label %26
26: ; preds = %22, %18
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 95
br label %30
30: ; preds = %26, %22, %14, %6
%31 = phi i1 [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @valid_a_char(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 3
%4 = add i8 %0, -37
%5 = icmp ult i8 %4, 27
%6 = or i1 %3, %5
%7 = add i8 %0, -65
%8 = icmp ult i8 %7, 26
%9 = or i1 %8, %6
%10 = icmp eq i8 %0, 95
%11 = or i1 %10, %9
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(char **);
void rtv_free_lines(int num_lines, char **lines) {
  (void)num_lines;
  free(lines);
}


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

x86 assembly (clang, -O2):
<rtv_free_lines>:
mov    %rsi,%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @rtv_free_lines(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @free(i8** %1)
ret void
}
void set_log_path(char *path) {}


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

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

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

LLVM IR (-O2):
define void @set_log_path(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int rand();
char randChar() { return (char)((rand() % 26) + (int)'A'); }


x86 assembly (clang, -O0):
<randChar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<randChar>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @randChar() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 26
%3 = add nsw i32 %2, 65
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @randChar() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 26
%3 = trunc i32 %2 to i8
%4 = add nsw i8 %3, 65
ret i8 %4
}
/* Variables and functions */
float poly(float, float, float, float, int);
float quintIn(float fraction, float start, float delta, float slope) {
  return poly(fraction, start, delta, slope, 5);
}


x86 assembly (clang, -O0):
<quintIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
mov    $0x5,%edi
call   1030 <poly@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quintIn>:
mov    $0x5,%edi
jmp    1030 <poly@plt>

LLVM IR (-O0):
define float @quintIn(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = call float @poly(float %9, float %10, float %11, float %12, i32 5)
ret float %13
}

LLVM IR (-O2):
define float @quintIn(float %0, float %1, float %2, float %3) {
%5 = tail call float @poly(float %0, float %1, float %2, float %3, i32 5)
ret float %5
}
int strt(int *a, int n) {
  int i = 0, j = 0;
  while (i < 20) {
    if (a[i] != 0) {
      j++;
      i++;
    } else
      j++;
  };
  return (j);
}


x86 assembly (clang, -O0):
<strt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    115a <strt+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     114c <strt+0x4c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <strt+0x55>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <strt+0x19>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strt>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ecx,%edx
add    $0x1,%eax
cmpl   $0x1,(%rdi,%rdx,4)
sbb    $0xffffffff,%ecx
cmp    $0x14,%ecx
jb     1110 <strt+0x10>
ret

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

LLVM IR (-O2):
define i32 @strt(i32* nocapture %0, i32 %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %10, %3 ]
%5 = phi i32 [ 0, %2 ], [ %12, %3 ]
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 0
%10 = add nuw nsw i32 %4, 1
%11 = zext i1 %9 to i32
%12 = add nuw nsw i32 %5, %11
%13 = icmp ult i32 %12, 20
br i1 %13, label %3, label %14
14: ; preds = %3
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int num = 15;
  int num2 = 69;
  printf("4islo = %d\n"
         "4islo2 = %d\n",
         num, num2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xf,%esi
mov    $0x45,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"4islo = %d\0A4islo2 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 15, i32* %2
store i32 69, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"4islo = %d\0A4islo2 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 15, i32 69)
ret i32 0
}
void ff_hevc_put_hevc_epel_v24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v24_12_sse4() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t reverseBits(uint32_t n) {
  uint32_t ret = 0;
  for (int i = 0; i < 32; i++) {
    ret = (ret << 1) | (n & 0x0001);
    n >>= 1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<reverseBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1147 <reverseBits+0x47>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <reverseBits+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseBits>:
xor    %eax,%eax
mov    $0x20,%ecx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
shl    $0x2,%edx
lea    (%rdx,%rax,8),%eax
mov    %edi,%edx
and    $0x2,%edx
or     %eax,%edx
mov    %edi,%eax
shr    $0x2,%eax
and    $0x1,%eax
or     %edx,%eax
mov    %edi,%edx
shr    $0x3,%edx
and    $0x1,%edx
lea    (%rdx,%rax,2),%eax
sar    $0x4,%edi
add    $0xfffffffc,%ecx
jne    1110 <reverseBits+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverseBits(i32 %0) {
br label %3
2: ; preds = %3
ret i32 %19
3: ; preds = %3, %1
%4 = phi i32 [ 0, %1 ], [ %21, %3 ]
%5 = phi i32 [ 0, %1 ], [ %19, %3 ]
%6 = phi i32 [ %0, %1 ], [ %20, %3 ]
%7 = shl i32 %5, 3
%8 = shl i32 %6, 2
%9 = and i32 %8, 4
%10 = or i32 %7, %9
%11 = and i32 %6, 2
%12 = or i32 %10, %11
%13 = lshr i32 %6, 2
%14 = and i32 %13, 1
%15 = or i32 %12, %14
%16 = lshr i32 %6, 3
%17 = shl i32 %15, 1
%18 = and i32 %16, 1
%19 = or i32 %17, %18
%20 = ashr i32 %6, 4
%21 = add nuw nsw i32 %4, 4
%22 = icmp eq i32 %21, 32
br i1 %22, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ f(int *);
int t1() {
  int x, y;
  int *a;
  a = &y;
  x = y;
  assert(x == y);
  f(a);
  assert(x == y);
  assert(a == &y);
  return 0;
}


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <f@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x8(%rbp),%rax
cmp    %rax,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
push   %rax
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @t1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32* %2, i32** %3
%4 = load i32, i32* %2
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32*, i32** %3
%11 = call i32 @f(i32* %10)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32*, i32** %3
%18 = icmp eq i32* %17, %2
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @t1() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @assert(i32 1)
%4 = call i32 @f(i32* %1)
%5 = call i32 @assert(i32 0)
%6 = call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
unsigned char _mm_aesencwide128kl_u8(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ const *, void const *);
unsigned char test__mm_aesencwide128kl_u8(__m128i odata[8],
                                          const __m128i idata[8],
                                          const void *h) {
  return _mm_aesencwide128kl_u8(odata, idata, h);
}


x86 assembly (clang, -O0):
<test__mm_aesencwide128kl_u8>:
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
call   1030 <_mm_aesencwide128kl_u8@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test__mm_aesencwide128kl_u8>:
jmp    1030 <_mm_aesencwide128kl_u8@plt>

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

LLVM IR (-O2):
define zeroext i8 @test__mm_aesencwide128kl_u8(i32* %0, i32* %1, i8* %2) {
%4 = tail call zeroext i8 @_mm_aesencwide128kl_u8(i32* %0, i32* %1, i8* %2)
ret i8 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ getline(char **, int *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int /*<<< orphan*/ stdin;
int main() {
  char *s = NULL;
  int len;
  getline(&s, &len, stdin);
  reverse(s);
  printf("%s\n", s);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <getline@plt>
mov    -0x10(%rbp),%rdi
call   1030 <reverse@plt>
mov    -0x10(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rdi
lea    0x14(%rsp),%rsi
call   1050 <getline@plt>
mov    0x8(%rsp),%rdi
call   1030 <reverse@plt>
mov    0x8(%rsp),%rsi
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i8*
%2 = alloca i32
%3 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* @stdin
%6 = call i32 @getline(i8** %1, i32* %2, i32 %5)
%7 = load i8*, i8** %1
%8 = call i32 @reverse(i8* %7)
%9 = load i8*, i8** %1
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage() {
  fputs("madasuld - evil media daemon\n", stderr);
  die("usage: madasuld [-p port]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
lea    0xede(%rip),%rdi
call   1040 <die@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1040 <die@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"madasuld - evil media daemon\0A\00"
@stderr = global i32 0
@.str.1 = [27 x i8] c"usage: madasuld [-p port]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @die(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"madasuld - evil media daemon\0A\00"
@stderr = global i32 0
@.str.1 = [27 x i8] c"usage: madasuld [-p port]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @die(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void tosSystem_init() {}


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

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

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

LLVM IR (-O2):
define void @tosSystem_init() {
ret void
}
int HugsAPIVersion() { return (5); }


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

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

LLVM IR (-O0):
define i32 @HugsAPIVersion() {
ret i32 5
}

LLVM IR (-O2):
define i32 @HugsAPIVersion() {
ret i32 5
}
void __outb(int port, unsigned char v) {
  *((volatile unsigned char *)(0x80000000 + port)) = v;
}


x86 assembly (clang, -O0):
<__outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x4(%rbp),%eax
add    $0x80000000,%eax
mov    %eax,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outb>:
mov    %edi,%eax
mov    $0x80000000,%ecx
xor    %rax,%rcx
mov    %sil,(%rcx)
ret

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

LLVM IR (-O2):
define void @__outb(i32 %0, i8 zeroext %1) {
%3 = xor i32 %0, -2147483648
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
store volatile i8 %1, i8* %5
ret void
}
int fun1349() { return 1349; }


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

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

LLVM IR (-O0):
define i32 @fun1349() {
ret i32 1349
}

LLVM IR (-O2):
define i32 @fun1349() {
ret i32 1349
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freep(void *p) {
  if (p == NULL)
    return;
  free(*(void **)p);
  *(void **)p = NULL;
}


x86 assembly (clang, -O0):
<freep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <freep+0x1c>
jmp    1143 <freep+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freep>:
test   %rdi,%rdi
je     1129 <freep+0x19>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @freep(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i8**
%5 = load i8*, i8** %4
%6 = tail call i32 @free(i8* %5)
store i8* null, i8** %4
br label %7
7: ; preds = %1, %3
ret void
}
void _DBG_NONE(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @_DBG_NONE(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
void get_capital(double *capital) {
  printf("Capital: ");
  scanf(" %lf", capital);
}


x86 assembly (clang, -O0):
<get_capital>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1040 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_capital>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <scanf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"Capital: \00"
@.str.1 = [5 x i8] c" %lf\00"
define void @get_capital(double* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double* %0)
ret void
}
int livepatch_callbacks_mod_init(void) {
  pr_info("%s\n", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<livepatch_callbacks_mod_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_info@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<livepatch_callbacks_mod_init>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee5(%rip),%rsi
xor    %eax,%eax
call   1030 <pr_info@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.livepatch_callbacks_mod_init = [29 x i8] c"livepatch_callbacks_mod_init\00"
define i32 @livepatch_callbacks_mod_init() {
%1 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @__func__.livepatch_callbacks_mod_init, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@__func__.livepatch_callbacks_mod_init = [29 x i8] c"livepatch_callbacks_mod_init\00"
define i32 @livepatch_callbacks_mod_init() {
%1 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @__func__.livepatch_callbacks_mod_init, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_cfg_radio_ctl_usage(void) {
  printf("\nUsage : sys_cfg_radio_ctl [0|1]\n");
  printf("\nOptions: 0     - Turn radio on");
  printf("\n         1     - Turn radio off");
  printf("\n         empty - Get current radio setting\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_sys_cfg_radio_ctl_usage>:
push   %rax
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
call   1040 <printf@plt>
lea    0xf16(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"\0AUsage : sys_cfg_radio_ctl [0|1]\0A\00"
@.str.1 = [32 x i8] c"\0AOptions: 0 - Turn radio on\00"
@.str.2 = [33 x i8] c"\0A 1 - Turn radio off\00"
@.str.3 = [45 x i8] c"\0A empty - Get current radio setting\0A\00"
define void @print_sys_cfg_radio_ctl_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [32 x i8] c"\0AOptions: 0 - Turn radio on\00"
@.str.2 = [33 x i8] c"\0A 1 - Turn radio off\00"
@str = [33 x i8] c"\0AUsage : sys_cfg_radio_ctl [0|1]\00"
@str.4 = [44 x i8] c"\0A empty - Get current radio setting\00"
define void @print_sys_cfg_radio_ctl_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fseeko64(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int fseeko(FILE *f, off_t offset, int whence) {
  return fseeko64(f, offset, whence);
}


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

x86 assembly (clang, -O2):
<fseeko>:
jmp    1030 <fseeko64@plt>

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

LLVM IR (-O2):
define i32 @fseeko(i32* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @fseeko64(i32* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ lowered_priviledge_function(char *);
int main(int argc, char *argv[]) {
  if (argc > 0)
    lowered_priviledge_function(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    113d <main+0x2d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <lowered_priviledge_function@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   %edi,%edi
jle    1122 <main+0x12>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <lowered_priviledge_function@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @lowered_priviledge_function(i8* %6)
br label %8
8: ; preds = %4, %2
ret i32 0
}
void X509_ATTRIBUTE_free(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ATTRIBUTE_free() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
struct ip {
  int /*<<< orphan*/ ip_dst;
  int /*<<< orphan*/ ip_src;
};

/* Variables and functions */
int isFrequentIPDst(int /*<<< orphan*/);
int isFrequentIPSrc(int /*<<< orphan*/);
int isFrequentIP(const u_char *p, int source) {
  return source ? isFrequentIPSrc(((struct ip *)(p + 14))->ip_src)
                : isFrequentIPDst(((struct ip *)(p + 14))->ip_dst);
}


x86 assembly (clang, -O0):
<isFrequentIP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114d <isFrequentIP+0x2d>
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%edi
call   1030 <isFrequentIPSrc@plt>
mov    %eax,-0x10(%rbp)
jmp    115c <isFrequentIP+0x3c>
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%edi
call   1040 <isFrequentIPDst@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFrequentIP>:
test   %esi,%esi
je     112c <isFrequentIP+0xc>
mov    0x3c(%rdi),%edi
jmp    1030 <isFrequentIPSrc@plt>
mov    0x38(%rdi),%edi
jmp    1040 <isFrequentIPDst@plt>

LLVM IR (-O0):
%struct.ip = type { i32, i32 }
define i32 @isFrequentIP(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 14
%10 = bitcast i32* %9 to %struct.ip*
%11 = getelementptr inbounds %struct.ip, %struct.ip* %10, i32 0, i32 1
%12 = load i32, i32* %11
%13 = call i32 @isFrequentIPSrc(i32 %12)
br label %21
14: ; preds = %2
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 14
%17 = bitcast i32* %16 to %struct.ip*
%18 = getelementptr inbounds %struct.ip, %struct.ip* %17, i32 0, i32 0
%19 = load i32, i32* %18
%20 = call i32 @isFrequentIPDst(i32 %19)
br label %21
21: ; preds = %14, %7
%22 = phi i32 [ %13, %7 ], [ %20, %14 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @isFrequentIP(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i32, i32* %0, i64 15
%6 = load i32, i32* %5
%7 = tail call i32 @isFrequentIPSrc(i32 %6)
br label %12
8: ; preds = %2
%9 = getelementptr inbounds i32, i32* %0, i64 14
%10 = load i32, i32* %9
%11 = tail call i32 @isFrequentIPDst(i32 %10)
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ %7, %4 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  unsigned long x = 'f';
  unsigned char byte = x & 0xFF;
  assert(byte == 'f');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x66,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
cmp    $0x66,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i8
store i32 0, i32* %1
store i64 102, i64* %2
%4 = load i64, i64* %2
%5 = and i64 %4, 255
%6 = trunc i64 %5 to i8
store i8 %6, i8* %3
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 102
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
struct triple {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ error(struct compile_state *, struct triple *, char *);
int /*<<< orphan*/ is_pointer(struct triple *);
void pointer(struct compile_state *state, struct triple *def) {
  if (!is_pointer(def)) {
    error(state, def, "pointer expected");
  }
}


x86 assembly (clang, -O0):
<pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <is_pointer@plt>
cmp    $0x0,%eax
jne    1156 <pointer+0x36>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xeaf(%rip),%rdx
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <is_pointer@plt>
test   %eax,%eax
je     113e <pointer+0x1e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xebb(%rip),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <error@plt>

LLVM IR (-O0):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
@.str = [17 x i8] c"pointer expected\00"
define void @pointer(%struct.compile_state* %0, %struct.triple* %1) {
%3 = alloca %struct.compile_state*
%4 = alloca %struct.triple*
store %struct.compile_state* %0, %struct.compile_state** %3
store %struct.triple* %1, %struct.triple** %4
%5 = load %struct.triple*, %struct.triple** %4
%6 = call i32 @is_pointer(%struct.triple* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load %struct.compile_state*, %struct.compile_state** %3
%10 = load %struct.triple*, %struct.triple** %4
%11 = call i32 @error(%struct.compile_state* %9, %struct.triple* %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
@.str = [17 x i8] c"pointer expected\00"
define void @pointer(%struct.compile_state* %0, %struct.triple* %1) {
%3 = tail call i32 @is_pointer(%struct.triple* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error(%struct.compile_state* %0, %struct.triple* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}