xunge/DecIR huggingface dataset:
void NullFunction(void *junk) { ; }


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

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

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

LLVM IR (-O2):
define void @NullFunction(i8* nocapture %0) {
ret void
}
int main() {
  int i = 0 + 1 + 2;
  int a;
  for (a = 1; a < 3; a++) {
    int j = i;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1137 <main+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int _kill(int pid, int sig) {
  if (pid) {
  }
  if (sig) {
  }
  errno = EINVAL;
  return (-1);
}


x86 assembly (clang, -O0):
<_kill>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1119 <_kill+0x19>
jmp    1119 <_kill+0x19>
cmpl   $0x0,-0x8(%rbp)
je     1128 <_kill+0x28>
jmp    1128 <_kill+0x28>
mov    0x2ea9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_kill>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @_kill(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 %8
7: ; preds = %2
br label %8
8: ; preds = %7, %2
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* @EINVAL
store i32 %13, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @_kill(i32 %0, i32 %1) {
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ _function(long);
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *);
long _main() {
  long EV_num;
  scanf("%ld", &EV_num);
  _function(EV_num);
  printf("%ld\n", (long)0);
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <_function@plt>
lea    0xeac(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%3 = load i64, i64* %1
%4 = call i32 @_function(i64 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 0)
ret i64 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i32 @_function(i64 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 0)
ret i64 0
}
/* Variables and functions */
char *mp_encode_bool(char *data, bool val) {
  *data = 0xc2 | (val & 1);
  return data + 1;
}


x86 assembly (clang, -O0):
<mp_encode_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
or     $0xc2,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_encode_bool>:
and    $0x1,%sil
or     $0xc2,%sil
mov    %sil,(%rdi)
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @mp_encode_bool(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = or i32 194, %6
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
store i8 %8, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
ret i8* %11
}

LLVM IR (-O2):
define i8* @mp_encode_bool(i8* writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = and i8 %3, 1
%5 = or i8 %4, -62
store i8 %5, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t h264sps_get_profile(const uint8_t *p_h264sps) { return p_h264sps[4]; }


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

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

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

LLVM IR (-O2):
define i32 @h264sps_get_profile(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int, char const *);
void log_any(const char *type, int code, const char *msg) {
  printf("%s[%d]: %s\n", type, code, msg);
}


x86 assembly (clang, -O0):
<log_any>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_any>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"%s[%d]: %s\0A\00"
define void @log_any(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
ret void
}
int test_imm_A0int64_lowword_reg(long long val) {
  return ((val) & (0xA0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A0int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xa0,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_A0int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 160
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int start_color() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @start_color() {
ret i32 0
}
void malloc_memory_check(void) { (void)0; }


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

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

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

LLVM IR (-O2):
define void @malloc_memory_check() {
ret void
}
void internal3(void) {}


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

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

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

LLVM IR (-O2):
define void @internal3() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ mem();
int main(int argc, char **argv) {
  mem();
  return (EXIT_SUCCESS);
}


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    $0x0,%al
call   1030 <mem@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 = call i32 (...) @mem()
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @mem()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
__attribute__((__always___)) void rte_xend(void) {
  asm volatile(".byte 0x0f,0x01,0xd5" ::: "memory");
}


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

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

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

LLVM IR (-O2):
define void @rte_xend() {
tail call void asm sideeffect ".byte 0x0f,0x01,0xd5", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_remove_state(int /*<<< orphan*/);
int /*<<< orphan*/ EVP_cleanup();
void Crypto_Exit() {
  ERR_free_strings();
  ERR_remove_state(0);
  EVP_cleanup();
}


x86 assembly (clang, -O0):
<Crypto_Exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <ERR_free_strings@plt>
xor    %edi,%edi
call   1030 <ERR_remove_state@plt>
mov    $0x0,%al
call   1040 <EVP_cleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Crypto_Exit>:
push   %rax
xor    %eax,%eax
call   1050 <ERR_free_strings@plt>
xor    %edi,%edi
call   1030 <ERR_remove_state@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <EVP_cleanup@plt>

LLVM IR (-O0):
define void @Crypto_Exit() {
%1 = call i32 (...) @ERR_free_strings()
%2 = call i32 @ERR_remove_state(i32 0)
%3 = call i32 (...) @EVP_cleanup()
ret void
}

LLVM IR (-O2):
define void @Crypto_Exit() {
%1 = tail call i32 (...) @ERR_free_strings()
%2 = tail call i32 @ERR_remove_state(i32 0)
%3 = tail call i32 (...) @EVP_cleanup()
ret void
}
void local_add_history(const char *string) {}


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

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

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

LLVM IR (-O2):
define void @local_add_history(i8* nocapture %0) {
ret void
}
int debug_step_03(int y) {
  int x = y;
  x++;
  x++;
  x++;
  x++;
  x++;
  x++;
  x++;
  x++;
  x++;
  x++;
  return x;
}


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

x86 assembly (clang, -O2):
<debug_step_03>:
lea    0xa(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @debug_step_03(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @debug_step_03(i32 %0) {
%2 = add nsw i32 %0, 10
ret i32 %2
}
void ble_rsp_sm_set_parameters(const void *nul) {}


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

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

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

LLVM IR (-O2):
define void @ble_rsp_sm_set_parameters(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double E_ToZeroTwoPi(double);
double M_PI;
double E_ToMinusPiPlusPi(double input) {
  double zero_2pi;
  double res = 0.0;
  zero_2pi = E_ToZeroTwoPi(input);
  if (zero_2pi > M_PI)
    res = -(2.0 * M_PI) + zero_2pi;
  else
    res = zero_2pi;
  return res;
  return res;
}


x86 assembly (clang, -O0):
<E_ToMinusPiPlusPi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <E_ToZeroTwoPi@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    0x2ea8(%rip),%rax
ucomisd (%rax),%xmm0
jbe    1183 <E_ToMinusPiPlusPi+0x73>
movsd  0xeae(%rip),%xmm0
mov    0x2e8f(%rip),%rax
mulsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    118d <E_ToMinusPiPlusPi+0x7d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E_ToMinusPiPlusPi>:
push   %rax
call   1030 <E_ToZeroTwoPi@plt>
mov    0x2ecb(%rip),%rax
movsd  (%rax),%xmm1
movsd  0xed7(%rip),%xmm2
mulsd  %xmm1,%xmm2
cmpltsd %xmm0,%xmm1
andpd  %xmm1,%xmm2
movsd  0xeca(%rip),%xmm3
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @E_ToMinusPiPlusPi(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %4
%5 = load double, double* %2
%6 = call double @E_ToZeroTwoPi(double %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = load double, double* @M_PI
%9 = fcmp ogt double %7, %8
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load double, double* @M_PI
%12 = fmul double 2.000000e+00, %11
%13 = fneg double %12
%14 = load double, double* %3
%15 = fadd double %13, %14
store double %15, double* %4
br label %18
16: ; preds = %1
%17 = load double, double* %3
store double %17, double* %4
br label %18
18: ; preds = %16, %10
%19 = load double, double* %4
ret double %19
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @E_ToMinusPiPlusPi(double %0) {
%2 = tail call double @E_ToZeroTwoPi(double %0)
%3 = load double, double* @M_PI
%4 = fcmp ogt double %2, %3
%5 = fmul double %3, -2.000000e+00
%6 = select i1 %4, double %5, double -0.000000e+00
%7 = fadd double %2, %6
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void impl_jmp(FILE *f, const char *lbl) { fprintf(f, "\tjmp %s\n", lbl); }


x86 assembly (clang, -O0):
<impl_jmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<impl_jmp>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\09jmp %s\0A\00"
define void @impl_jmp(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\09jmp %s\0A\00"
define void @impl_jmp(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
int do_586() { return 586; }


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

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

LLVM IR (-O0):
define i32 @do_586() {
ret i32 586
}

LLVM IR (-O2):
define i32 @do_586() {
ret i32 586
}
float g1(float x) { return x * (x >= 0.f ? 1.f : -1.f); }


x86 assembly (clang, -O0):
<g1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xee5(%rip),%xmm4
movss  0xee1(%rip),%xmm3
xorps  %xmm1,%xmm1
cmpless %xmm2,%xmm1
movaps %xmm1,%xmm2
andps  %xmm4,%xmm2
andnps %xmm3,%xmm1
orps   %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<g1>:
movaps 0xef9(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @g1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fcmp oge float %4, 0.000000e+00
%6 = zext i1 %5 to i64
%7 = select i1 %5, float 1.000000e+00, float -1.000000e+00
%8 = fmul float %3, %7
ret float %8
}

LLVM IR (-O2):
define float @g1(float %0) {
%2 = fcmp oge float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %0, float %3
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ Lut_N(double *, double *, int);
void Lut_11(double *out, double *in) { Lut_N(out, in, 11); }


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

x86 assembly (clang, -O2):
<Lut_11>:
mov    $0xb,%edx
jmp    1030 <Lut_N@plt>

LLVM IR (-O0):
define void @Lut_11(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 = call i32 @Lut_N(double* %5, double* %6, i32 11)
ret void
}

LLVM IR (-O2):
define void @Lut_11(double* %0, double* %1) {
%3 = tail call i32 @Lut_N(double* %0, double* %1, i32 11)
ret void
}
void *MemoryAlloc(unsigned int size) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @MemoryAlloc(i32 %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
unsigned int __VERIFIER_nondet_uint();
int main(void) {
  unsigned int a = __VERIFIER_nondet_uint();
  __VERIFIER_assert(a >= 0);
  __VERIFIER_assert(a > -1);
  __VERIFIER_assert(!(a < 0));
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
cmpl   $0xffffffff,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
cmpl   $0x0,-0x8(%rbp)
setb   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %edi,%edi
call   1030 <__VERIFIER_assert@plt>
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_uint()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp uge i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @__VERIFIER_assert(i32 %6)
%8 = load i32, i32* %2
%9 = icmp ugt i32 %8, -1
%10 = zext i1 %9 to i32
%11 = call i32 @__VERIFIER_assert(i32 %10)
%12 = load i32, i32* %2
%13 = icmp ult i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
%16 = call i32 @__VERIFIER_assert(i32 %15)
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = tail call i32 @__VERIFIER_assert(i32 1)
%3 = tail call i32 @__VERIFIER_assert(i32 0)
%4 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ AllocArrays();
int /*<<< orphan*/ ComputeDiffusionCoefficient();
int /*<<< orphan*/ ComputeFacf();
int /*<<< orphan*/ ComputeFrictionCoefficient();
int /*<<< orphan*/ ComputeRandomForce();
int /*<<< orphan*/ IntegrateFacf();
int /*<<< orphan*/ LoadForceData();
int /*<<< orphan*/ PrintFacf();
int main() {
  AllocArrays();
  LoadForceData();
  ComputeRandomForce();
  ComputeFacf();
  PrintFacf();
  IntegrateFacf();
  ComputeFrictionCoefficient();
  ComputeDiffusionCoefficient();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <AllocArrays@plt>
mov    $0x0,%al
call   1040 <LoadForceData@plt>
mov    $0x0,%al
call   1070 <ComputeRandomForce@plt>
mov    $0x0,%al
call   1050 <ComputeFacf@plt>
mov    $0x0,%al
call   1060 <PrintFacf@plt>
mov    $0x0,%al
call   1030 <IntegrateFacf@plt>
mov    $0x0,%al
call   10a0 <ComputeFrictionCoefficient@plt>
mov    $0x0,%al
call   1090 <ComputeDiffusionCoefficient@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <AllocArrays@plt>
xor    %eax,%eax
call   1040 <LoadForceData@plt>
xor    %eax,%eax
call   1070 <ComputeRandomForce@plt>
xor    %eax,%eax
call   1050 <ComputeFacf@plt>
xor    %eax,%eax
call   1060 <PrintFacf@plt>
xor    %eax,%eax
call   1030 <IntegrateFacf@plt>
xor    %eax,%eax
call   10a0 <ComputeFrictionCoefficient@plt>
xor    %eax,%eax
call   1090 <ComputeDiffusionCoefficient@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @AllocArrays()
%3 = call i32 (...) @LoadForceData()
%4 = call i32 (...) @ComputeRandomForce()
%5 = call i32 (...) @ComputeFacf()
%6 = call i32 (...) @PrintFacf()
%7 = call i32 (...) @IntegrateFacf()
%8 = call i32 (...) @ComputeFrictionCoefficient()
%9 = call i32 (...) @ComputeDiffusionCoefficient()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @AllocArrays()
%2 = tail call i32 (...) @LoadForceData()
%3 = tail call i32 (...) @ComputeRandomForce()
%4 = tail call i32 (...) @ComputeFacf()
%5 = tail call i32 (...) @PrintFacf()
%6 = tail call i32 (...) @IntegrateFacf()
%7 = tail call i32 (...) @ComputeFrictionCoefficient()
%8 = tail call i32 (...) @ComputeDiffusionCoefficient()
ret i32 0
}
float mmapSet(float *addr, long i, float v) { return addr[i] = v; }


x86 assembly (clang, -O0):
<mmapSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmapSet>:
movss  %xmm0,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define float @mmapSet(float* %0, i64 %1, float %2) {
%4 = alloca float*
%5 = alloca i64
%6 = alloca float
store float* %0, float** %4
store i64 %1, i64* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds float, float* %8, i64 %9
store float %7, float* %10
ret float %7
}

LLVM IR (-O2):
define float @mmapSet(float* nocapture writeonly %0, i64 %1, float returned %2) {
%4 = getelementptr inbounds float, float* %0, i64 %1
store float %2, float* %4
ret float %2
}
/* Variables and functions */
scalar_t__ strchr(char *, char);
int sugar(char *tok) { return strchr("=(){};\n", tok[0]) != 0; }


x86 assembly (clang, -O0):
<sugar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xed9(%rip),%rdi
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sugar>:
push   %rax
movsbl (%rdi),%esi
lea    0xee5(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"=(){};\0A\00"
define i32 @sugar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call i64 @strchr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [8 x i8] c"=(){};\0A\00"
define i32 @sugar(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @strchr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %2)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ job_list(int, int /*<<< orphan*/ *);
int job_status(int argc, char *argv[]) {
  job_list(1, NULL);
  return 1;
}


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

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

LLVM IR (-O0):
define i32 @job_status(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @job_list(i32 1, i32* null)
ret i32 1
}

LLVM IR (-O2):
define i32 @job_status(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @job_list(i32 1, i32* null)
ret i32 1
}
int fibonacci(int ceil) {
  if (1 < ceil)
    return fibonacci(ceil - 1) + fibonacci(ceil - 2);
  else if (1 == ceil)
    return 1;
  else if (0 == ceil)
    return 0;
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    1151 <fibonacci+0x41>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    118c <fibonacci+0x7c>
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    116b <fibonacci+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    118c <fibonacci+0x7c>
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
jne    1182 <fibonacci+0x72>
movl   $0x0,-0x4(%rbp)
jmp    118c <fibonacci+0x7c>
jmp    1187 <fibonacci+0x77>
jmp    118c <fibonacci+0x7c>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1136 <fibonacci+0x26>
xor    %ebp,%ebp
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <fibonacci@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1120 <fibonacci+0x10>
jmp    1138 <fibonacci+0x28>
mov    %ebx,%ecx
cmp    $0x1,%ecx
sbb    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacci(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ugt i32 %4, 3
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
%16 = add nsw i32 %12, %15
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ combineHelp(int *, int /*<<< orphan*/, int, int,
                               int /*<<< orphan*/);
void combine(int *arr, int num, int sel) { combineHelp(arr, 0, num, sel, 0); }


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

x86 assembly (clang, -O2):
<combine>:
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
xor    %r8d,%r8d
jmp    1030 <combineHelp@plt>

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

LLVM IR (-O2):
define void @combine(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @combineHelp(i32* %0, i32 0, i32 %1, i32 %2, i32 0)
ret void
}
isalnum(c) register int c;
{
  return (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') || (c == '_') ||
          (c == '.') || ('0' <= c && c <= '9'));
}


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x41,%eax
cmp    -0x4(%rbp),%eax
jg     1124 <isalnum+0x24>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1182 <isalnum+0x82>
mov    $0x61,%eax
cmp    -0x4(%rbp),%eax
jg     1141 <isalnum+0x41>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1182 <isalnum+0x82>
mov    $0x1,%al
cmpl   $0x5f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1182 <isalnum+0x82>
mov    $0x1,%al
cmpl   $0x2e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1182 <isalnum+0x82>
xor    %eax,%eax
mov    $0x30,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jg     117c <isalnum+0x7c>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
mov    %edi,%ecx
and    $0xffffffdf,%ecx
add    $0xffffffbf,%ecx
mov    $0x1,%eax
cmp    $0x1a,%ecx
jb     111c <isalnum+0x1c>
cmp    $0x2e,%edi
je     111c <isalnum+0x1c>
cmp    $0x5f,%edi
jne    111d <isalnum+0x1d>
ret
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
br i1 %4, label %10, label %5
5: ; preds = %1
switch i32 %0, label %6 [
i32 95, label %10
i32 46, label %10
]
6: ; preds = %5
%7 = add i32 %0, -48
%8 = icmp ult i32 %7, 10
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %5, %1, %6
%11 = phi i32 [ %9, %6 ], [ 1, %1 ], [ 1, %5 ], [ 1, %5 ]
ret i32 %11
}
double product(double a, double b) { return a * b; }


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

x86 assembly (clang, -O2):
<product>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @product(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 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @product(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ dlclose(void *);
void dlclosep(void **p) {
  if (*p)
    dlclose(*p);
}


x86 assembly (clang, -O0):
<dlclosep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <dlclosep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <dlclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlclosep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <dlclosep+0xd>
jmp    1030 <dlclose@plt>
ret

LLVM IR (-O0):
define void @dlclosep(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%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*** %2
%8 = load i8*, i8** %7
%9 = call i32 @dlclose(i8* %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @dlclosep(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @dlclose(i8* %2)
br label %6
6: ; preds = %4, %1
ret void
}
void foo363() {}


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

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

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

LLVM IR (-O2):
define void @foo363() {
ret void
}
void RTSha1FromString(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSha1FromString() {
ret void
}
/* Variables and functions */
int MTwister_Int32();
long MTwister_Int31(void) { return (long)(MTwister_Int32() >> 1); }


x86 assembly (clang, -O0):
<MTwister_Int31>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <MTwister_Int32@plt>
sar    $0x1,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<MTwister_Int31>:
push   %rax
xor    %eax,%eax
call   1030 <MTwister_Int32@plt>
sar    %eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @MTwister_Int31() {
%1 = call i32 (...) @MTwister_Int32()
%2 = ashr i32 %1, 1
%3 = sext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @MTwister_Int31() {
%1 = tail call i32 (...) @MTwister_Int32()
%2 = ashr i32 %1, 1
%3 = sext i32 %2 to i64
ret i64 %3
}
int intcompar(const void *a, const void *b) {
  return *((int *)a) - *((int *)b);
}


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

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

LLVM IR (-O0):
define i32 @intcompar(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcompar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t gf_mul_bit(uint8_t a, uint8_t b) {
  uint8_t sum_log;
  while (b) {
    if (b & 1) {
      sum_log ^= a;
    }
    a = (a << 1) ^ (a & 0x80 ? 0x1d : 0);
    b >>= 1;
  }
  return sum_log;
}


x86 assembly (clang, -O0):
<gf_mul_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115b <gf_mul_bit+0x5b>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112c <gf_mul_bit+0x2c>
mov    -0x4(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%esi
and    $0x80,%esi
xor    %ecx,%ecx
mov    $0x1d,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gf_mul_bit+0xa>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf_mul_bit>:
test   %esi,%esi
je     1133 <gf_mul_bit+0x33>
mov    %esi,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %esi,%edx
and    $0x1,%edx
neg    %edx
and    %edi,%edx
xor    %edx,%eax
lea    (%rdi,%rdi,1),%edx
movsbl %dil,%edi
shr    $0x7,%edi
and    $0x1d,%edi
xor    %edx,%edi
sar    %ecx
cmp    $0x1,%esi
mov    %ecx,%esi
ja     1110 <gf_mul_bit+0x10>
ret

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

LLVM IR (-O2):
define i32 @gf_mul_bit(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %19, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ undef, %2 ]
%6 = phi i32 [ %17, %4 ], [ %1, %2 ]
%7 = phi i32 [ %16, %4 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 0, i32 %7
%11 = xor i32 %10, %5
%12 = shl i32 %7, 1
%13 = and i32 %7, 128
%14 = icmp eq i32 %13, 0
%15 = select i1 %14, i32 0, i32 29
%16 = xor i32 %15, %12
%17 = ashr i32 %6, 1
%18 = icmp ult i32 %6, 2
br i1 %18, label %19, label %4
19: ; preds = %4, %2
%20 = phi i32 [ undef, %2 ], [ %11, %4 ]
ret i32 %20
}
/* Type definitions */
struct domainlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ domain_merge_one(struct domainlist **, char *);
void domain_add(struct domainlist **domp, char *domain) {
  domain_merge_one(domp, domain);
}


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

x86 assembly (clang, -O2):
<domain_add>:
jmp    1030 <domain_merge_one@plt>

LLVM IR (-O0):
%struct.domainlist = type { i32 }
define void @domain_add(%struct.domainlist** %0, i8* %1) {
%3 = alloca %struct.domainlist**
%4 = alloca i8*
store %struct.domainlist** %0, %struct.domainlist*** %3
store i8* %1, i8** %4
%5 = load %struct.domainlist**, %struct.domainlist*** %3
%6 = load i8*, i8** %4
%7 = call i32 @domain_merge_one(%struct.domainlist** %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.domainlist = type { i32 }
define void @domain_add(%struct.domainlist** %0, i8* %1) {
%3 = tail call i32 @domain_merge_one(%struct.domainlist** %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ detab(char *);
int /*<<< orphan*/ esettab(int, char **, char *);
int main(int argc, char *argv[]) {
  char tab[100 + 1];
  esettab(argc, argv, tab);
  detab(tab);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x80(%rbp),%rdx
call   1040 <esettab@plt>
lea    -0x80(%rbp),%rdi
call   1030 <detab@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdx
call   1040 <esettab@plt>
mov    %rbx,%rdi
call   1030 <detab@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [101 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds [101 x i8], [101 x i8]* %6, i64 0, i64 0
%10 = call i32 @esettab(i32 %7, i8** %8, i8* %9)
%11 = getelementptr inbounds [101 x i8], [101 x i8]* %6, i64 0, i64 0
%12 = call i32 @detab(i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [101 x i8]
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%5 = call i32 @esettab(i32 %0, i8** %1, i8* %4)
%6 = call i32 @detab(i8* %4)
ret i32 0
}
/* Variables and functions */
double downloadSpeed(int, int, double);
double totalTime(int time, int startTime, double bytes, double totalBytes) {
  return (totalBytes / (downloadSpeed(time, startTime, bytes)));
}


x86 assembly (clang, -O0):
<totalTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
call   1030 <downloadSpeed@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<totalTime>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <downloadSpeed@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @totalTime(i32 %0, i32 %1, double %2, double %3) {
%5 = tail call double @downloadSpeed(i32 %0, i32 %1, double %2)
%6 = fdiv double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ CS_finish();
int /*<<< orphan*/ CS_start();
int /*<<< orphan*/ IR_start();
int /*<<< orphan*/ IR_stop();
int /*<<< orphan*/ test();
int main(void) {
  IR_start();
  CS_start();
  test();
  CS_finish();
  IR_stop();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <IR_start@plt>
mov    $0x0,%al
call   1060 <CS_start@plt>
mov    $0x0,%al
call   1070 <test@plt>
mov    $0x0,%al
call   1040 <CS_finish@plt>
mov    $0x0,%al
call   1030 <IR_stop@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <IR_start@plt>
xor    %eax,%eax
call   1060 <CS_start@plt>
xor    %eax,%eax
call   1070 <test@plt>
xor    %eax,%eax
call   1040 <CS_finish@plt>
xor    %eax,%eax
call   1030 <IR_stop@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @IR_start()
%3 = call i32 (...) @CS_start()
%4 = call i32 (...) @test()
%5 = call i32 (...) @CS_finish()
%6 = call i32 (...) @IR_stop()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @IR_start()
%2 = tail call i32 (...) @CS_start()
%3 = tail call i32 (...) @test()
%4 = tail call i32 (...) @CS_finish()
%5 = tail call i32 (...) @IR_stop()
ret i32 0
}
/* Variables and functions */
double fabs(double);
double Func_Abs(double *oplist, unsigned int numops) { return fabs(oplist[0]); }


x86 assembly (clang, -O0):
<Func_Abs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movaps 0xee6(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Func_Abs>:
movsd  (%rdi),%xmm0
andps  0xef5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Func_Abs(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = call double @llvm.fabs.f64(double %7)
ret double %8
}

LLVM IR (-O2):
define double @Func_Abs(double* nocapture %0, i32 %1) {
%3 = load double, double* %0
%4 = tail call double @llvm.fabs.f64(double %3)
ret double %4
}