xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ player_pause();
void cmd_p_pause(char *arg) { player_pause(); }


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

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

LLVM IR (-O0):
define void @cmd_p_pause(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @player_pause()
ret void
}

LLVM IR (-O2):
define void @cmd_p_pause(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @player_pause()
ret void
}
void log_debug(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_debug(i8* nocapture %0, ...) {
ret void
}
int addOK(int x, int y) {
  int i = 1 << 31;
  int z = (((x + y) & i) >> 31) & 1;
  int m = ((x & i) >> 31) & 1;
  int n = ((y & i) >> 31) & 1;
  return (!n & !z) | (!m & n) | (m & z);
}


x86 assembly (clang, -O0):
<addOK>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x80000000,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x10(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmpl   $0x0,-0x14(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
and    -0x18(%rbp),%ecx
or     %ecx,%eax
mov    -0x14(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addOK>:
lea    (%rsi,%rdi,1),%eax
mov    %eax,%ecx
or     %esi,%ecx
not    %ecx
and    %edi,%eax
not    %edi
and    %esi,%edi
or     %edi,%eax
or     %ecx,%eax
shr    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @addOK(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = or i32 %3, %1
%5 = xor i32 %4, -1
%6 = xor i32 %0, -1
%7 = and i32 %6, %1
%8 = or i32 %7, %5
%9 = and i32 %3, %0
%10 = or i32 %8, %9
%11 = lshr i32 %10, 31
ret i32 %11
}
f(int a, int b, int c) { return a == b & b == c; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x8(%rbp),%ecx
cmp    -0xc(%rbp),%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %esi,%edi
xor    %esi,%edx
xor    %eax,%eax
or     %edi,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @f(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 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp eq i32 %11, %12
%14 = zext i1 %13 to i32
%15 = and i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %1
%5 = icmp eq i32 %1, %2
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int _tolower(int);
int tolower(int c) { return _tolower(c); }


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

x86 assembly (clang, -O2):
<tolower>:
jmp    1030 <_tolower@plt>

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i32 @_tolower(i32 %0)
ret i32 %2
}
unsigned int _add_thread(unsigned int id) {
  unsigned int res;
  unsigned int cmd;
  cmd = ((0x11000000) | (((0x0) & 0x00000003) << 16) |
         (((id)&0x000000FF) << 2) | (((0x04) & 0x0000001F) << 10));
  res = (*(volatile unsigned int *)(cmd));
  return res;
}


x86 assembly (clang, -O0):
<_add_thread>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x2,%eax
or     $0x11000000,%eax
or     $0x1000,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_add_thread>:
movzbl %dil,%eax
shl    $0x2,%eax
mov    0x11001000(%rax),%eax
ret

LLVM IR (-O0):
define i32 @_add_thread(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 255
%7 = shl i32 %6, 2
%8 = or i32 285212672, %7
%9 = or i32 %8, 4096
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @_add_thread(i32 %0) {
%2 = shl i32 %0, 2
%3 = and i32 %2, 1020
%4 = or i32 %3, 285216768
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int gca_cmp_uint8(const void *aa, const void *bb) {
  const uint8_t a = *(const uint8_t *)aa;
  const uint8_t b = *(const uint8_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x20(%rbp),%rcx
cmp    -0x18(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp_uint8>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp_uint8(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %6
%18 = load i64, i64* %5
%19 = icmp sgt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @gca_cmp_uint8(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %6, %4
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ __emit_expression_range(int /*<<< orphan*/, int);
void test_within_macro_1(int lhs, int rhs) {
  __emit_expression_range(0, lhs == rhs);
}


x86 assembly (clang, -O0):
<test_within_macro_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
xor    %edi,%edi
call   1030 <__emit_expression_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_within_macro_1>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
xor    %edi,%edi
mov    %eax,%esi
jmp    1030 <__emit_expression_range@plt>

LLVM IR (-O0):
define void @test_within_macro_1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @__emit_expression_range(i32 0, i32 %8)
ret void
}

LLVM IR (-O2):
define void @test_within_macro_1(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @__emit_expression_range(i32 0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mock_push(int /*<<< orphan*/);
int /*<<< orphan*/ pack_glXSwapIntervalMESA(int /*<<< orphan*/ *, unsigned int);
int glXSwapIntervalMESA(unsigned int interval) {
  { mock_push(pack_glXSwapIntervalMESA(NULL, interval)); };
  return (int)0;
}


x86 assembly (clang, -O0):
<glXSwapIntervalMESA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pack_glXSwapIntervalMESA@plt>
mov    %eax,%edi
call   1030 <mock_push@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glXSwapIntervalMESA>:
push   %rax
mov    %edi,%esi
xor    %edi,%edi
call   1040 <pack_glXSwapIntervalMESA@plt>
mov    %eax,%edi
call   1030 <mock_push@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @glXSwapIntervalMESA(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @pack_glXSwapIntervalMESA(i32* null, i32 %3)
%5 = call i32 @mock_push(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @glXSwapIntervalMESA(i32 %0) {
%2 = tail call i32 @pack_glXSwapIntervalMESA(i32* null, i32 %0)
%3 = tail call i32 @mock_push(i32 %2)
ret i32 0
}
int rb_isascii(int c) { return '\0' <= c && c <= '\x7f'; }


x86 assembly (clang, -O0):
<rb_isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1121 <rb_isascii+0x21>
cmpl   $0x7f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @rb_isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
double hello_sum(double x, double y) { return x + y; }


x86 assembly (clang, -O0):
<hello_sum>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello_sum>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @hello_sum(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @hello_sum(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "Usage: date_cluster --db /path/to/db --start start_date "
                  "--end end_date\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
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):
<print_usage>:
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 = [72 x i8] c"Usage: date_cluster --db /path/to/db --start start_date --end end_date\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [72 x i8] c"Usage: date_cluster --db /path/to/db --start start_date --end end_date\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
float tilt_get_z(void) { return 0.0f; }


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

x86 assembly (clang, -O2):
<tilt_get_z>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @tilt_get_z() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @tilt_get_z() {
ret float 0.000000e+00
}
/* Variables and functions */
int mydup2(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int tmp = mydup2(2, 5);
  printf("%d\n", tmp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <mydup2@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <mydup2@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @mydup2(i32 2, i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
unsigned long hash2(const char *rawKey) {
  const unsigned char *s = (const unsigned char *)rawKey;
  unsigned long hash = 0;
  do {
    hash ^= (unsigned long)*s;
    hash +=
        (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);
  } while (*++s);
  return hash;
}


x86 assembly (clang, -O0):
<hash2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    -0x18(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
shl    $0x7,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
shl    $0x8,%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
shl    $0x18,%rcx
add    %rcx,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,0x1(%rax)
jne    1118 <hash2+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash2>:
mov    (%rdi),%cl
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movzbl %cl,%ecx
xor    %rax,%rcx
imul   $0x1000193,%rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash2+0x10>
ret

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

LLVM IR (-O2):
define i64 @hash2(i8* nocapture %0) {
%2 = load i8, i8* %0
br label %3
3: ; preds = %3, %1
%4 = phi i8 [ %2, %1 ], [ %11, %3 ]
%5 = phi i8* [ %0, %1 ], [ %10, %3 ]
%6 = phi i64 [ 0, %1 ], [ %9, %3 ]
%7 = zext i8 %4 to i64
%8 = xor i64 %6, %7
%9 = mul i64 %8, 16777619
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %3
13: ; preds = %3
ret i64 %9
}
/* Variables and functions */
float get_percentage(unsigned long long total, unsigned long long hit) {
  return (total == 0 ? 0 : (((float)hit) / total) * 100);
}


x86 assembly (clang, -O0):
<get_percentage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1124 <get_percentage+0x24>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11c7 <get_percentage+0xc7>
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x1c(%rbp)
test   %rax,%rax
movss  %xmm0,-0x18(%rbp)
js     1161 <get_percentage+0x61>
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x24(%rbp)
test   %rax,%rax
movss  %xmm0,-0x20(%rbp)
js     11a8 <get_percentage+0xa8>
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x28(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  0xe42(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_percentage>:
test   %rdi,%rdi
je     112b <get_percentage+0x2b>
test   %rsi,%rsi
js     112f <get_percentage+0x2f>
cvtsi2ss %rsi,%xmm0
test   %rdi,%rdi
jns    1149 <get_percentage+0x49>
mov    %rdi,%rax
shr    %rax
and    $0x1,%edi
or     %rax,%rdi
cvtsi2ss %rdi,%xmm1
addss  %xmm1,%xmm1
jmp    114e <get_percentage+0x4e>
xorps  %xmm0,%xmm0
ret
mov    %rsi,%rax
shr    %rax
and    $0x1,%esi
or     %rax,%rsi
cvtsi2ss %rsi,%xmm0
addss  %xmm0,%xmm0
test   %rdi,%rdi
js     1114 <get_percentage+0x14>
cvtsi2ss %rdi,%xmm1
divss  %xmm1,%xmm0
mulss  0xea6(%rip),%xmm0
ret

LLVM IR (-O0):
define float @get_percentage(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %15
8: ; preds = %2
%9 = load i64, i64* %4
%10 = uitofp i64 %9 to float
%11 = load i64, i64* %3
%12 = uitofp i64 %11 to float
%13 = fdiv float %10, %12
%14 = fmul float %13, 1.000000e+02
br label %15
15: ; preds = %8, %7
%16 = phi float [ 0.000000e+00, %7 ], [ %14, %8 ]
ret float %16
}

LLVM IR (-O2):
define float @get_percentage(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = uitofp i64 %1 to float
%6 = uitofp i64 %0 to float
%7 = fdiv float %5, %6
%8 = fmul float %7, 1.000000e+02
br label %9
9: ; preds = %2, %4
%10 = phi float [ %8, %4 ], [ 0.000000e+00, %2 ]
ret float %10
}
int PtDrvShutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @PtDrvShutdown() {
ret i32 0
}
/* Variables and functions */
int __WORDSIZE;
int /*<<< orphan*/ __bitmap_or(unsigned long *, unsigned long const *,
                               unsigned long const *, int);
void bitmap_or(unsigned long *dst, const unsigned long *src1,
               const unsigned long *src2, int nbits) {
  if (nbits <= __WORDSIZE)
    *dst = *src1 | *src2;
  else
    __bitmap_or(dst, src1, src2, nbits);
}


x86 assembly (clang, -O0):
<bitmap_or>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2eb7(%rip),%rcx
cmp    (%rcx),%eax
jg     1153 <bitmap_or+0x43>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x18(%rbp),%rax
or     (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1167 <bitmap_or+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <__bitmap_or@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_or>:
mov    0x2ed1(%rip),%rax
cmp    %ecx,(%rax)
jge    1120 <bitmap_or+0x10>
jmp    1030 <__bitmap_or@plt>
mov    (%rdx),%rax
or     (%rsi),%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
@__WORDSIZE = global i32 0
define void @bitmap_or(i64* %0, i64* %1, i64* %2, i32 %3) {
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i32
store i64* %0, i64** %5
store i64* %1, i64** %6
store i64* %2, i64** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32, i32* @__WORDSIZE
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %4
%13 = load i64*, i64** %6
%14 = load i64, i64* %13
%15 = load i64*, i64** %7
%16 = load i64, i64* %15
%17 = or i64 %14, %16
%18 = load i64*, i64** %5
store i64 %17, i64* %18
br label %25
19: ; preds = %4
%20 = load i64*, i64** %5
%21 = load i64*, i64** %6
%22 = load i64*, i64** %7
%23 = load i32, i32* %8
%24 = call i32 @__bitmap_or(i64* %20, i64* %21, i64* %22, i32 %23)
br label %25
25: ; preds = %19, %12
ret void
}

LLVM IR (-O2):
@__WORDSIZE = global i32 0
define void @bitmap_or(i64* %0, i64* %1, i64* %2, i32 %3) {
%5 = load i32, i32* @__WORDSIZE
%6 = icmp slt i32 %5, %3
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = load i64, i64* %1
%9 = load i64, i64* %2
%10 = or i64 %9, %8
store i64 %10, i64* %0
br label %13
11: ; preds = %4
%12 = tail call i32 @__bitmap_or(i64* %0, i64* %1, i64* %2, i32 %3)
br label %13
13: ; preds = %11, %7
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ putchar(int);
int main() {
  int c;
  while (c = getchar() != EOF) {
    if (c == 1) {
      putchar('1');
    } else if (c == 0) {
      putchar('0');
    } else {
      putchar(c);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x8(%rbp)
test   $0x1,%al
jne    115b <main+0x3b>
jmp    119f <main+0x7f>
cmpl   $0x1,-0x8(%rbp)
jne    1174 <main+0x54>
mov    $0x31,%edi
call   1030 <putchar@plt>
jmp    119a <main+0x7a>
cmpl   $0x0,-0x8(%rbp)
jne    118d <main+0x6d>
mov    $0x30,%edi
call   1030 <putchar@plt>
jmp    1195 <main+0x75>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    119a <main+0x7a>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%rax
je     1156 <main+0x36>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x31,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%rax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %22, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
%7 = zext i1 %6 to i32
store i32 %7, i32* %2
br i1 %6, label %8, label %23
8: ; preds = %3
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @putchar(i32 49)
br label %22
13: ; preds = %8
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @putchar(i32 48)
br label %21
18: ; preds = %13
%19 = load i32, i32* %2
%20 = call i32 @putchar(i32 %19)
br label %21
21: ; preds = %18, %16
br label %22
22: ; preds = %21, %11
br label %3
23: ; preds = %3
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@EOF = global i64 0
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @putchar(i32 49)
%6 = tail call i64 (...) @getchar()
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void nosmime(void) { fprintf(stderr, "No S/MIME support compiled in.\n"); }


x86 assembly (clang, -O0):
<nosmime>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nosmime>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"No S/MIME support compiled in.\0A\00"
define void @nosmime() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"No S/MIME support compiled in.\0A\00"
define void @nosmime() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
void RTBldCfgVersion(void) {}


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

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

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

LLVM IR (-O2):
define void @RTBldCfgVersion() {
ret void
}
void write_belong(unsigned char *p, unsigned long v) {
  p[0] = (unsigned char)((v >> 24) & 0xff);
  p[1] = (unsigned char)((v >> 16) & 0xff);
  p[2] = (unsigned char)((v >> 8) & 0xff);
  p[3] = (unsigned char)((v)&0xff);
}


x86 assembly (clang, -O0):
<write_belong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_belong>:
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @write_belong(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = lshr i64 %5, 24
%7 = and i64 %6, 255
%8 = trunc i64 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i64, i64* %4
%12 = lshr i64 %11, 16
%13 = and i64 %12, 255
%14 = trunc i64 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i64, i64* %4
%18 = lshr i64 %17, 8
%19 = and i64 %18, 255
%20 = trunc i64 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
%23 = load i64, i64* %4
%24 = and i64 %23, 255
%25 = trunc i64 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @write_belong(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
store i8 %4, i8* %0
%5 = lshr i64 %1, 16
%6 = trunc i64 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i64 %1, 8
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i64 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int mkstemps(char *, int /*<<< orphan*/);
int mkstemp(char *s) { return mkstemps(s, 0); }


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

x86 assembly (clang, -O2):
<mkstemp>:
xor    %esi,%esi
jmp    1030 <mkstemps@plt>

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

LLVM IR (-O2):
define i32 @mkstemp(i8* %0) {
%2 = tail call i32 @mkstemps(i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bfs();
int /*<<< orphan*/ chushihua();
int /*<<< orphan*/ pr();
int main() {
  chushihua();
  bfs();
  pr();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <chushihua@plt>
mov    $0x0,%al
call   1050 <bfs@plt>
mov    $0x0,%al
call   1040 <pr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @chushihua()
%2 = tail call i32 (...) @bfs()
%3 = tail call i32 (...) @pr()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  int length = 0;
  unsigned hdr_len = 8;
  unsigned data_len = length - hdr_len;
  printf("%u\n", data_len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xec0(%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    $0xfffffff8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fprintf(stderr, "Usage: setsid cmd [cmdarg ..]\n");
  exit(EX_USAGE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: setsid cmd [cmdarg ..]\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%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 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: setsid cmd [cmdarg ..]\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%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 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
double Pts(double inches) { return (72 * inches); }


x86 assembly (clang, -O0):
<Pts>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pts>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Pts(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 7.200000e+01, %3
ret double %4
}

LLVM IR (-O2):
define double @Pts(double %0) {
%2 = fmul double %0, 7.200000e+01
ret double %2
}
/* Variables and functions */
int pathcon_nm8_f0(double const **, double **, int *, double *, int);
int pathcon_nm8(const double **arg, double **res, int *iw, double *w, int mem) {
  return pathcon_nm8_f0(arg, res, iw, w, mem);
}


x86 assembly (clang, -O0):
<pathcon_nm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <pathcon_nm8_f0@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm8>:
jmp    1030 <pathcon_nm8_f0@plt>

LLVM IR (-O0):
define i32 @pathcon_nm8(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @pathcon_nm8_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @pathcon_nm8(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @pathcon_nm8_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_22(int Salt, int Parameter) {
  unsigned b = Salt * 0x57f27c5F + 0x2433;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x57f27c5f,-0x4(%rbp),%eax
add    $0x2433,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_22>:
imul   $0x57f27c5f,%edi,%edi
add    $0x2433,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_22(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 1475509343
%8 = add nsw i32 %7, 9267
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_22(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 1475509343
%4 = add nsw i32 %3, 9267
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
void bar(char *x) {
  int i;
  for (i = 0; i < 2; i++)
    ;
  x[i + i + i + i] = '\0';
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    112c <bar+0x2c>
jmp    111e <bar+0x1e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <bar+0xf>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    -0xc(%rbp),%ecx
add    -0xc(%rbp),%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
movb   $0x0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @bar(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
store i8 0, i8* %2
ret void
}
/* Type definitions */
typedef int __u64;
typedef int __u32;

/* Variables and functions */
double hea_cq_timestamp_double(__u32 s, __u32 frac) {
  const double div = 4294967296.;
  __u64 v;
  double ret;
  v = s;
  v <<= 32;
  v |= frac;
  ret = (double)v / div;
  return ret;
}


x86 assembly (clang, -O0):
<hea_cq_timestamp_double>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  0xeee(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @hea_cq_timestamp_double(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
%7 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
store double 0x41F0000000000000, double* %5
%8 = load i32, i32* %3
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = shl i32 %9, 32
store i32 %10, i32* %6
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = or i32 %12, %11
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = sitofp i32 %14 to double
%16 = fdiv double %15, 0x41F0000000000000
store double %16, double* %7
%17 = load double, double* %7
ret double %17
}

LLVM IR (-O2):
define double @hea_cq_timestamp_double(i32 %0, i32 %1) {
ret double poison
}
/* Variables and functions */
char *str_home_replace(char *);
void str_home_replace_array(int argc, char **argv) {
  int i;
  for (i = 0; i < argc; i++)
    argv[i] = str_home_replace(argv[i]);
}


x86 assembly (clang, -O0):
<str_home_replace_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1160 <str_home_replace_array+0x50>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <str_home_replace@plt>
mov    %rax,%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <str_home_replace_array+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_home_replace_array>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1146 <str_home_replace_array+0x36>
mov    %rsi,%r15
mov    %edi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <str_home_replace@plt>
mov    %rax,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <str_home_replace_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @str_home_replace_array(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i8* @str_home_replace(i8* %9)
store i8* %10, i8** %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ len(char const *);
int write(int, char const *, int /*<<< orphan*/);
int pprint(const char *str, int fd) {
  ssize_t wr;
  wr = 0;
  if ((wr = write(fd, str, len(str))) == -1)
    return (84);
  return (0);
}


x86 assembly (clang, -O0):
<pprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <len@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1173 <pprint+0x53>
movl   $0x54,-0x4(%rbp)
jmp    117a <pprint+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pprint>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <len@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
mov    $0x54,%eax
cmovne %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pprint(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %5
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @len(i8* %9)
%11 = call i32 @write(i32 %7, i8* %8, i32 %10)
store i32 %11, i32* %6
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 84, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @pprint(i8* %0, i32 %1) {
%3 = tail call i32 @len(i8* %0)
%4 = tail call i32 @write(i32 %1, i8* %0, i32 %3)
%5 = icmp eq i32 %4, -1
%6 = select i1 %5, i32 84, i32 0
ret i32 %6
}
/* Variables and functions */
float sqrt(float const);
float vlength(const float *v) {
  return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
}


x86 assembly (clang, -O0):
<vlength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vlength>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113f <vlength+0x2f>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define float @vlength(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fmul float %11, %14
%16 = call float @llvm.fmuladd.f32(float %5, float %8, float %15)
%17 = load float*, float** %2
%18 = getelementptr inbounds float, float* %17, i64 2
%19 = load float, float* %18
%20 = load float*, float** %2
%21 = getelementptr inbounds float, float* %20, i64 2
%22 = load float, float* %21
%23 = call float @llvm.fmuladd.f32(float %19, float %22, float %16)
%24 = call float @sqrt(float %23)
ret float %24
}

LLVM IR (-O2):
define float @vlength(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
%10 = tail call float @sqrt(float %9)
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
long rul__sql_start(char *txn_type) {
  long len;
  long sql_status;
  char sql_stmt[8192 + 1];
  printf("\n Now in routine rul__sql_start ... \n");
  return 1;
}


x86 assembly (clang, -O0):
<rul__sql_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2020,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x2020,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"\0A Now in routine rul__sql_start ... \0A\00"
define i64 @rul__sql_start(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca [8193 x i8]
store i8* %0, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret i64 1
}

LLVM IR (-O2):
@str = [37 x i8] c"\0A Now in routine rul__sql_start ... \00"
define i64 @rul__sql_start(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i64 1
}