xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Platform_Halt(int);
long long OPV_NaturalAlignment(long long size, long long max) {
  long long _o_result;
  long long i;
  if (size >= max) {
    _o_result = max;
    return _o_result;
  } else {
    i = 1;
    while (i < size) {
      i += i;
    }
    _o_result = i;
    return _o_result;
  }
__retchk:
  Platform_Halt(-3);
  return 0;
  ;
}


x86 assembly (clang, -O0):
<OPV_NaturalAlignment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     112f <OPV_NaturalAlignment+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <OPV_NaturalAlignment+0x66>
movq   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1156 <OPV_NaturalAlignment+0x56>
mov    -0x28(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1137 <OPV_NaturalAlignment+0x37>
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPV_NaturalAlignment>:
mov    %rsi,%rax
cmp    %rsi,%rdi
jge    111b <OPV_NaturalAlignment+0x1b>
mov    $0x1,%ecx
nopl   (%rax)
mov    %rcx,%rax
add    %rcx,%rcx
cmp    %rdi,%rax
jl     1110 <OPV_NaturalAlignment+0x10>
ret

LLVM IR (-O0):
define i64 @OPV_NaturalAlignment(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = icmp sge i64 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %5
store i64 %12, i64* %6
%13 = load i64, i64* %6
store i64 %13, i64* %3
br label %28
14: ; preds = %2
store i64 1, i64* %7
br label %15
15: ; preds = %19, %14
%16 = load i64, i64* %7
%17 = load i64, i64* %4
%18 = icmp slt i64 %16, %17
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i64, i64* %7
%21 = load i64, i64* %7
%22 = add nsw i64 %21, %20
store i64 %22, i64* %7
br label %15
23: ; preds = %15
%24 = load i64, i64* %7
store i64 %24, i64* %6
%25 = load i64, i64* %6
store i64 %25, i64* %3
br label %28
26: ; No predecessors!
%27 = call i32 @Platform_Halt(i32 -3)
store i64 0, i64* %3
br label %28
28: ; preds = %26, %23, %11
%29 = load i64, i64* %3
ret i64 %29
}

LLVM IR (-O2):
define i64 @OPV_NaturalAlignment(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
br i1 %3, label %4, label %8
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ 1, %2 ]
%6 = icmp slt i64 %5, %0
%7 = shl nsw i64 %5, 1
br i1 %6, label %4, label %8
8: ; preds = %4, %2
%9 = phi i64 [ %1, %2 ], [ %5, %4 ]
ret i64 %9
}
/* Variables and functions */
long Cal(int /*<<< orphan*/);
int /*<<< orphan*/ Jul(long);
int Valid_date(long d) { return d == Cal(Jul(d)); }


x86 assembly (clang, -O0):
<Valid_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Jul@plt>
mov    %eax,%edi
call   1040 <Cal@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Valid_date>:
push   %rbx
mov    %rdi,%rbx
call   1030 <Jul@plt>
mov    %eax,%edi
call   1040 <Cal@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Valid_date(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = call i32 @Jul(i64 %4)
%6 = call i64 @Cal(i32 %5)
%7 = icmp eq i64 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @Valid_date(i64 %0) {
%2 = tail call i32 @Jul(i64 %0)
%3 = tail call i64 @Cal(i32 %2)
%4 = icmp eq i64 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ sqrt(float);
float sqrtf(float x) { return (float)sqrt(x); }


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

x86 assembly (clang, -O2):
<sqrtf>:
push   %rax
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sqrtf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @sqrt(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @sqrtf(float %0) {
%2 = tail call i64 @sqrt(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
int error(const char *self, const char *binary, const char *err) {
  fprintf(stderr, "%s: %s: %s\n", self, binary, err);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
lea    0xed6(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @error(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %10)
%12 = load i32, i32* @EXIT_FAILURE
ret i32 %12
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"%s: %s: %s\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @error(i8* %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int n;
  int sum;
  n = __VERIFIER_nondet_int();
  sum = 0;
  while (n != 0) {
    sum = sum + n;
    n = n - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1151 <main+0x41>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
const char *IcsGetLibVersion(void) { return "1.6.2"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"1.6.2\00"
define i8* @IcsGetLibVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.6.2\00"
define i8* @IcsGetLibVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ circle_shape(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int, int, int);
void effect(void) { circle_shape(0, 0, 0, 6, 10, ((1 << 12) - 1)); }


x86 assembly (clang, -O0):
<effect>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x6,%ecx
mov    $0xa,%r8d
mov    $0xfff,%r9d
mov    %edx,%edi
mov    %edx,%esi
call   1030 <circle_shape@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<effect>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x6,%ecx
mov    $0xa,%r8d
mov    $0xfff,%r9d
jmp    1030 <circle_shape@plt>

LLVM IR (-O0):
define void @effect() {
%1 = call i32 @circle_shape(i32 0, i32 0, i32 0, i32 6, i32 10, i32 4095)
ret void
}

LLVM IR (-O2):
define void @effect() {
%1 = tail call i32 @circle_shape(i32 0, i32 0, i32 0, i32 6, i32 10, i32 4095)
ret void
}
void ff_hevc_put_hevc_uni_epel_hv4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv4_12_sse4() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int EINVAL;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int do_fallocate_syscall(const char *path, __u64 bytecount) {
  int err;
  fprintf(stderr, "Error: this copy of hdparm was built without %s support\n",
          path);
  err = EINVAL;
  return err;
}


x86 assembly (clang, -O0):
<do_fallocate_syscall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_fallocate_syscall>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"Error: this copy of hdparm was built without %s support\0A\00"
@EINVAL = global i32 0
define i32 @do_fallocate_syscall(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @EINVAL
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"Error: this copy of hdparm was built without %s support\0A\00"
@EINVAL = global i32 0
define i32 @do_fallocate_syscall(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @EINVAL
ret i32 %5
}
int str_check_ptr(void *ptr) {
  unsigned long p = (unsigned long)ptr;
  if (p < 64 || p > (64 * 1024 * 1024))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<str_check_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x40,-0x18(%rbp)
jb     1129 <str_check_ptr+0x29>
cmpq   $0x4000000,-0x18(%rbp)
04
jbe    1135 <str_check_ptr+0x35>
movl   $0x0,-0x4(%rbp)
jmp    113c <str_check_ptr+0x3c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_check_ptr>:
cmp    $0x40,%rdi
setae  %al
cmp    $0x4000001,%rdi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @str_check_ptr(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp ult i64 %7, 64
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i64, i64* %4
%11 = icmp ugt i64 %10, 67108864
br i1 %11, label %12, label %13
12: ; preds = %9, %1
store i32 0, i32* %2
br label %14
13: ; preds = %9
store i32 1, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @str_check_ptr(i8* readnone %0) {
%2 = icmp uge i8* %0, inttoptr (i64 64 to i8*)
%3 = icmp ule i8* %0, inttoptr (i64 67108864 to i8*)
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned xrop3_251_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~S;
  stk2 = T | stk3;
  stk1 = D | stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_251_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_251_1_1>:
mov    %esi,%ecx
shl    $0x8,%ecx
or     %edi,%esi
shl    $0x8,%edi
lea    (%rdi,%rsi,1),%eax
or     %ecx,%eax
not    %eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_251_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %5
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %7
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_251_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i8 %1, %0
%8 = zext i8 %7 to i32
%9 = or i32 %4, %8
%10 = or i32 %9, %6
%11 = xor i32 %10, -1
%12 = or i32 %8, %11
ret i32 %12
}
/* Variables and functions */
int ctags_cli_main(int, char **);
int main(int argc, char **argv) { return ctags_cli_main(argc, argv); }


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ctags_cli_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <ctags_cli_main@plt>

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 = load i8**, i8*** %5
%8 = call i32 @ctags_cli_main(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ctags_cli_main(i32 %0, i8** %1)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ count;
};
struct TYPE_4__ {
  TYPE_1__ xgraphicsexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xgraphicsexpose_count(void *_p) {
  return (int)((XEvent *)_p)->xgraphicsexpose.count;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xgraphicsexpose_count(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xgraphicsexpose_count(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR8D_get(void) { return U_WMRCORENONE_get("U_WMR8D"); }


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

x86 assembly (clang, -O2):
<U_WMR8D_get>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_get@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR8D\00"
define i32 @U_WMR8D_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR8D\00"
define i32 @U_WMR8D_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ _swap(double *, double *);
void swap(double *arr1, double *arr2, unsigned int length) {
  for (unsigned int i = 0; i < length; i++)
    _swap(&arr1[i], &arr2[i]);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1165 <swap+0x55>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%eax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%eax
shl    $0x3,%rax
add    %rax,%rsi
call   1030 <_swap@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <swap+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %r15
push   %r14
push   %rbx
test   %edx,%edx
je     1149 <swap+0x39>
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <_swap@plt>
add    $0x8,%rbx
add    $0x8,%r14
add    $0xffffffffffffffff,%r15
jne    1130 <swap+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @swap(double* %0, double* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %8
7: ; preds = %8, %3
ret void
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %13, %8 ]
%10 = getelementptr inbounds double, double* %0, i64 %9
%11 = getelementptr inbounds double, double* %1, i64 %9
%12 = tail call i32 @_swap(double* %10, double* %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %7, label %8
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int, int, int);
int main() { foo(1, 2, 3, 4); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @foo(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}
/* Variables and functions */
int getmaxy(int /*<<< orphan*/);
int /*<<< orphan*/ stdscr;
int winy() {
  int max_row = getmaxy(stdscr);
  return (max_row - 22) / 2 - 1;
}


x86 assembly (clang, -O0):
<winy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
call   1030 <getmaxy@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x16,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<winy>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <getmaxy@plt>
mov    %eax,%ecx
add    $0xffffffea,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
add    $0xffffffea,%eax
sar    %eax
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdscr = global i32 0
define i32 @winy() {
%1 = alloca i32
%2 = load i32, i32* @stdscr
%3 = call i32 @getmaxy(i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = sub nsw i32 %4, 22
%6 = sdiv i32 %5, 2
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
@stdscr = global i32 0
define i32 @winy() {
%1 = load i32, i32* @stdscr
%2 = tail call i32 @getmaxy(i32 %1)
%3 = add nsw i32 %2, -22
%4 = sdiv i32 %3, 2
%5 = add nsw i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int OWSearch();
int OWNext() { return OWSearch(); }


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

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

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

LLVM IR (-O2):
define i32 @OWNext() {
%1 = tail call i32 (...) @OWSearch()
ret i32 %1
}
void s390_pv_vm_disable(void) {}


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

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

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

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

/* Variables and functions */
__attribute__((always_)) void BME_XOR_W(volatile uint32_t *addr,
                                        register uint32_t wdata) {
  *(volatile uint32_t *)((uint32_t)addr | (3 << 26)) = wdata;
}


x86 assembly (clang, -O0):
<BME_XOR_W>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     $0xc000000,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BME_XOR_W>:
movslq %edi,%rax
or     $0xc000000,%rax
mov    %esi,(%rax)
ret

LLVM IR (-O0):
define void @BME_XOR_W(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 = load i32*, i32** %3
%7 = ptrtoint i32* %6 to i32
%8 = or i32 %7, 201326592
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %5, i32* %10
ret void
}

LLVM IR (-O2):
define void @BME_XOR_W(i32* %0, i32 %1) {
%3 = ptrtoint i32* %0 to i64
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = or i64 %5, 201326592
%7 = inttoptr i64 %6 to i32*
store volatile i32 %1, i32* %7
ret void
}
int fun153() { return 153; }


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

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

LLVM IR (-O0):
define i32 @fun153() {
ret i32 153
}

LLVM IR (-O2):
define i32 @fun153() {
ret i32 153
}
int main() { return "foobar"[3]; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movsbl 0xef1(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"foobar\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 3)
%3 = sext i8 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
ret i32 98
}
int op_and(int a, int b) { return (a && b); }


x86 assembly (clang, -O0):
<op_and>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1123 <op_and+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_and>:
test   %edi,%edi
setne  %al
test   %esi,%esi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @op_and(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int fstat(fd, buf)
int fd;
struct stat *buf;
{
  char Xbuf[100];
  int retval;
  retval = __fstat(fd, Xbuf);
  Xcvt(Xbuf, (char *)buf);
  return retval;
}


x86 assembly (clang, -O0):
<fstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    $0x0,%al
call   1030 <__fstat@plt>
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <Xcvt@plt>
mov    -0x84(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fstat>:
push   %rbp
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <__fstat@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <Xcvt@plt>
mov    %ebp,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type opaque
define i32 @fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
%5 = alloca [100 x i8]
%6 = alloca i32
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%7 = load i32, i32* %3
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%9 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @__fstat to i32 (i32, i8*, ...)*)(i32 %7, i8* %8)
store i32 %9, i32* %6
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%11 = load %struct.stat*, %struct.stat** %4
%12 = bitcast %struct.stat* %11 to i8*
%13 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @Xcvt to i32 (i8*, i8*, ...)*)(i8* %10, i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @fstat(i32 %0, %struct.stat* %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @__fstat to i32 (i32, i8*, ...)*)(i32 %0, i8* %4)
%6 = bitcast %struct.stat* %1 to i8*
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @Xcvt to i32 (i8*, i8*, ...)*)(i8* %4, i8* %6)
ret i32 %5
}
/* Variables and functions */
int PTHREAD_PRIO_INHERIT;
void test_PTHREAD_PRIO_INHERIT(void) {
  int dummy = PTHREAD_PRIO_INHERIT;
  (void)dummy;
}


x86 assembly (clang, -O0):
<test_PTHREAD_PRIO_INHERIT>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@PTHREAD_PRIO_INHERIT = global i32 0
define void @test_PTHREAD_PRIO_INHERIT() {
%1 = alloca i32
%2 = load i32, i32* @PTHREAD_PRIO_INHERIT
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
@PTHREAD_PRIO_INHERIT = global i32 0
define void @test_PTHREAD_PRIO_INHERIT() {
ret void
}
char *strecbrk(char *p, char *e, char k) {
  while (p < e)
    if (*p == k)
      break;
    else
      p++;
  return p;
}


x86 assembly (clang, -O0):
<strecbrk>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1148 <strecbrk+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1137 <strecbrk+0x37>
jmp    1148 <strecbrk+0x48>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1111 <strecbrk+0x11>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strecbrk>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jae    1121 <strecbrk+0x21>
mov    %rsi,%rcx
sub    %rax,%rcx
xchg   %ax,%ax
cmp    %dl,(%rax)
je     1121 <strecbrk+0x21>
add    $0x1,%rax
add    $0xffffffffffffffff,%rcx
jne    1110 <strecbrk+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @strecbrk(i8* %0, i8* readnone %1, i8 signext %2) {
%4 = icmp ult i8* %0, %1
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = ptrtoint i8* %1 to i64
%7 = ptrtoint i8* %0 to i64
%8 = sub i64 %6, %7
%9 = getelementptr i8, i8* %0, i64 %8
br label %10
10: ; preds = %5, %14
%11 = phi i8* [ %15, %14 ], [ %0, %5 ]
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, %2
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = getelementptr inbounds i8, i8* %11, i64 1
%16 = icmp eq i8* %15, %9
br i1 %16, label %17, label %10
17: ; preds = %14, %10, %3
%18 = phi i8* [ %0, %3 ], [ %11, %10 ], [ %9, %14 ]
ret i8* %18
}
/* Variables and functions */
int /*<<< orphan*/ rt_InitInfAndNaN(unsigned int);
void FMdemodHilber_initialize(void) { rt_InitInfAndNaN(8U); }


x86 assembly (clang, -O0):
<FMdemodHilber_initialize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
call   1030 <rt_InitInfAndNaN@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FMdemodHilber_initialize>:
mov    $0x8,%edi
jmp    1030 <rt_InitInfAndNaN@plt>

LLVM IR (-O0):
define void @FMdemodHilber_initialize() {
%1 = call i32 @rt_InitInfAndNaN(i32 8)
ret void
}

LLVM IR (-O2):
define void @FMdemodHilber_initialize() {
%1 = tail call i32 @rt_InitInfAndNaN(i32 8)
ret void
}
void exec_init(void) {}


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

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

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

LLVM IR (-O2):
define void @exec_init() {
ret void
}
int ft_isblank(s)
char *s;
{
  if (!s || !*s)
    return 1;
  for (; *s; s++) {
    if (*s != ' ')
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<ft_isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1120 <ft_isblank+0x20>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    112c <ft_isblank+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1177 <ft_isblank+0x77>
jmp    1131 <ft_isblank+0x31>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1170 <ft_isblank+0x70>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     115a <ft_isblank+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1177 <ft_isblank+0x77>
jmp    115f <ft_isblank+0x5f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1131 <ft_isblank+0x31>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isblank>:
mov    $0x1,%eax
test   %rdi,%rdi
je     1124 <ft_isblank+0x24>
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <ft_isblank+0x24>
add    $0x1,%rdi
cmp    $0x20,%cl
jne    111e <ft_isblank+0x1e>
movzbl (%rdi),%ecx
jmp    1110 <ft_isblank+0x10>
test   %cl,%cl
je     1124 <ft_isblank+0x24>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isblank(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %9
%7 = phi i8 [ %11, %9 ], [ %4, %3 ]
%8 = phi i8* [ %10, %9 ], [ %0, %3 ]
switch i8 %7, label %12 [
i8 0, label %13
i8 32, label %9
]
9: ; preds = %6
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
br label %6
12: ; preds = %6
br label %13
13: ; preds = %6, %12, %1, %3
%14 = phi i32 [ 1, %3 ], [ 1, %1 ], [ 0, %12 ], [ 1, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("Usage: manage_stty_lock [lock|unlock] [tty]\n"
         "requires root (or CAP_SYS_ADMIN)\n"
         "\n"
         "To lock a terminal, use `lock` as the first argument.  To unlock "
         "one, use\n"
         "`unlock` as the first argument.  The second argument can be utilized "
         "to specify\n"
         "which terminal to lock/unlock; if it is left unset, the current "
         "terminal is\n"
         "utilized.\n"
         "\n"
         "Example, locking /dev/pts/1:\n"
         "\n"
         "	manage_stty_lock lock /dev/pts/1\n"
         "\n"
         "Example, unlocking the current terminal:\n"
         "\n"
         "	Example: manage_stty_lock unlock\n");
}


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

x86 assembly (clang, -O2):
<print_help>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [461 x i8] c"Usage: manage_stty_lock [lock|unlock] [tty]\0Arequires root (or CAP_SYS_ADMIN)\0A\0ATo lock a terminal, use `lock` as the first argument. To unlock one, use\0A`unlock` as the first argument. The second argument can be utilized to specify\0Awhich terminal to lock/unlock; if it is left unset, the current terminal is\0Autilized.\0A\0AExample, locking /dev/pts/1:\0A\0A\09manage_stty_lock lock /dev/pts/1\0A\0AExample, unlocking the current terminal:\0A\0A\09Example: manage_stty_lock unlock\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([461 x i8], [461 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [460 x i8] c"Usage: manage_stty_lock [lock|unlock] [tty]\0Arequires root (or CAP_SYS_ADMIN)\0A\0ATo lock a terminal, use `lock` as the first argument. To unlock one, use\0A`unlock` as the first argument. The second argument can be utilized to specify\0Awhich terminal to lock/unlock; if it is left unset, the current terminal is\0Autilized.\0A\0AExample, locking /dev/pts/1:\0A\0A\09manage_stty_lock lock /dev/pts/1\0A\0AExample, unlocking the current terminal:\0A\0A\09Example: manage_stty_lock unlock\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([460 x i8], [460 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int bar(char *);
int /*<<< orphan*/ foo(char *, int);
scalar_t__ malloc(int);
int main(void) {
  char a = 0xA;
  int b = 0xB;
  char *buff;
  buff = (char *)malloc(b);
  foo(buff, b);
  return bar(buff);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0xa,-0x5(%rbp)
movl   $0xb,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <foo@plt>
mov    -0x18(%rbp),%rdi
call   1030 <bar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xb,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xb,%esi
call   1050 <foo@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i8*
store i32 0, i32* %1
store i8 10, i8* %2
store i32 11, i32* %3
%5 = load i32, i32* %3
%6 = call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = load i32, i32* %3
%10 = call i32 @foo(i8* %8, i32 %9)
%11 = load i8*, i8** %4
%12 = call i32 @bar(i8* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 11)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @foo(i8* %2, i32 11)
%4 = tail call i32 @bar(i8* %2)
ret i32 %4
}
void dummy_close(struct bladerf *dev) {}


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

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

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

LLVM IR (-O2):
%struct.bladerf = type opaque
define void @dummy_close(%struct.bladerf* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void fun() {
  static int a = 3;
  if (--a)
    fun();
  printf("%d\n", a);
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f06(%rip),%eax
add    $0xffffffff,%eax
mov    %eax,0x2efd(%rip)
cmp    $0x0,%eax
je     1141 <fun+0x21>
call   1030 <fun@plt>
mov    0x2ee9(%rip),%esi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rax
addl   $0xffffffff,0x2f08(%rip)
je     1137 <fun+0x17>
call   1030 <fun@plt>
mov    0x2efb(%rip),%esi
jmp    1139 <fun+0x19>
xor    %esi,%esi
lea    0xec0(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@fun.a = internal global i32 3
@.str = [4 x i8] c"%d\0A\00"
define void @fun() {
%1 = load i32, i32* @fun.a
%2 = add nsw i32 %1, -1
store i32 %2, i32* @fun.a
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %0
%6 = load i32, i32* @fun.a
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@fun.a = internal unnamed_addr global i32 3
@.str = [4 x i8] c"%d\0A\00"
define void @fun() {
%1 = load i32, i32* @fun.a
%2 = add nsw i32 %1, -1
store i32 %2, i32* @fun.a
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
tail call void @fun()
%5 = load i32, i32* @fun.a
br label %6
6: ; preds = %4, %0
%7 = phi i32 [ %5, %4 ], [ 0, %0 ]
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}
/* Variables and functions */
void Default_MemoryManagement_Handler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Default_MemoryManagement_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void exit(int code) { *((volatile char *)(0xf0000000 + 1)) = code; }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    $0xf0000001,%eax
mov    %cl,(%rax)

x86 assembly (clang, -O2):
<exit>:
mov    $0xf0000001,%eax
mov    %dil,(%rax)

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* inttoptr (i64 4026531841 to i8*)
unreachable
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = trunc i32 %0 to i8
store volatile i8 %2, i8* inttoptr (i64 4026531841 to i8*)
unreachable
}
int test_imm_9Euint8_reg(unsigned char val) {
  return ((val) & (-0x9E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Euint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff62,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Euint8_reg>:
test   $0x62,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Euint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 98
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
double power(double x, double y) {
  double p;
  p = 1.0;
  for (int i = 0; i < y; ++i) {
    p = p * x;
  }
  return p;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1153 <power+0x53>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1122 <power+0x22>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    1139 <power+0x39>
movsd  0xeee(%rip),%xmm2
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
mulsd  %xmm0,%xmm2
add    $0x1,%eax
ucomisd %xmm3,%xmm1
ja     1120 <power+0x20>
movapd %xmm2,%xmm0
ret
movsd  0xebf(%rip),%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @power(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %3
store double %1, double* %4
store double 1.000000e+00, double* %5
store i32 0, i32* %6
br label %7
7: ; preds = %16, %2
%8 = load i32, i32* %6
%9 = sitofp i32 %8 to double
%10 = load double, double* %4
%11 = fcmp olt double %9, %10
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = load double, double* %5
%14 = load double, double* %3
%15 = fmul double %13, %14
store double %15, double* %5
br label %16
16: ; preds = %12
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %7
19: ; preds = %7
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
define double @power(double %0, double %1) {
%3 = fcmp ogt double %1, 0.000000e+00
br i1 %3, label %6, label %4
4: ; preds = %6, %2
%5 = phi double [ 1.000000e+00, %2 ], [ %9, %6 ]
ret double %5
6: ; preds = %2, %6
%7 = phi i32 [ %10, %6 ], [ 0, %2 ]
%8 = phi double [ %9, %6 ], [ 1.000000e+00, %2 ]
%9 = fmul double %8, %0
%10 = add nuw nsw i32 %7, 1
%11 = sitofp i32 %10 to double
%12 = fcmp olt double %11, %1
br i1 %12, label %6, label %4
}
void unlock_log_lock(void) {}


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

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

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

LLVM IR (-O2):
define void @unlock_log_lock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void syntax_error(void) {
  fprintf(stderr, "Usage: blkdiscard [-f] device\n");
  exit(1);
}


x86 assembly (clang, -O0):
<syntax_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<syntax_error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: blkdiscard [-f] device\0A\00"
define void @syntax_error() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: blkdiscard [-f] device\0A\00"
define void @syntax_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}