xunge/DecIR huggingface dataset:
void math_atan2(void) {
  double d1 = luaL_check_number(1);
  double d2 = luaL_check_number(2);
  lua_pushnumber(((atan2(d1, d2)) * 180.0 / 3.14159265358979323846));
}


x86 assembly (clang, -O0):
<math_atan2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x2,%edi
mov    $0x0,%al
call   1040 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
movsd  0xe8f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe7b(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    $0x1,%al
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_atan2>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
xor    %eax,%eax
call   1040 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
call   1030 <atan2@plt>
mulsd  0xe98(%rip),%xmm0
divsd  0xe98(%rip),%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_atan2() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%4 = sitofp i32 %3 to double
store double %4, double* %1
%5 = call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 2)
%6 = sitofp i32 %5 to double
store double %6, double* %2
%7 = load double, double* %1
%8 = load double, double* %2
%9 = call double @atan2(double %7, double %8)
%10 = fmul double %9, 1.800000e+02
%11 = fdiv double %10, 0x400921FB54442D18
%12 = call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %11)
ret void
}

LLVM IR (-O2):
define void @math_atan2() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%2 = sitofp i32 %1 to double
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 2)
%4 = sitofp i32 %3 to double
%5 = tail call double @atan2(double %2, double %4)
%6 = fmul double %5, 1.800000e+02
%7 = fdiv double %6, 0x400921FB54442D18
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %7)
ret void
}
/* Variables and functions */
scalar_t__ argument_delim_split(char const *, char ***);
char **get_command(const char *cCommand) {
  char **command = NULL;
  if (argument_delim_split(cCommand, &command) < 0)
    return NULL;
  return command;
}


x86 assembly (clang, -O0):
<get_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <argument_delim_split@plt>
cmp    $0x0,%rax
jge    1148 <get_command+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1150 <get_command+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_command>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <argument_delim_split@plt>
test   %rax,%rax
js     112c <get_command+0x1c>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8** @get_command(i8* %0) {
%2 = alloca i8**
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** null, i8*** %4
%5 = load i8*, i8** %3
%6 = call i64 @argument_delim_split(i8* %5, i8*** %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i8** null, i8*** %2
br label %11
9: ; preds = %1
%10 = load i8**, i8*** %4
store i8** %10, i8*** %2
br label %11
11: ; preds = %9, %8
%12 = load i8**, i8*** %2
ret i8** %12
}

LLVM IR (-O2):
define i8** @get_command(i8* %0) {
%2 = alloca i8**
%3 = bitcast i8*** %2 to i8*
store i8** null, i8*** %2
%4 = call i64 @argument_delim_split(i8* %0, i8*** %2)
%5 = icmp slt i64 %4, 0
%6 = load i8**, i8*** %2
%7 = select i1 %5, i8** null, i8** %6
ret i8** %7
}
void time_waitproc(bufnum, sock) unsigned int bufnum;
int sock;
{ nuke_tcp_socket(sock); }


x86 assembly (clang, -O0):
<time_waitproc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <nuke_tcp_socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_waitproc>:
mov    %esi,%edi
xor    %eax,%eax
jmp    1030 <nuke_tcp_socket@plt>

LLVM IR (-O0):
define void @time_waitproc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 (i32, ...) bitcast (i32 (...)* @nuke_tcp_socket to i32 (i32, ...)*)(i32 %5)
ret void
}

LLVM IR (-O2):
define void @time_waitproc(i32 %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @nuke_tcp_socket to i32 (i32, ...)*)(i32 %1)
ret void
}
int s3c2410_pm_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @s3c2410_pm_init() {
ret i32 0
}
void path_016_expected_8(int a, int b) {
  switch (a) {
  case 0:
    if (a > 0) {
      return;
    }
    break;
  case 1:
    if (a > 10) {
      return;
    }
    break;
  default:
    break;
  }
  if (b) {
  }
}


x86 assembly (clang, -O0):
<path_016_expected_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     112e <path_016_expected_8+0x2e>
jmp    111d <path_016_expected_8+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1142 <path_016_expected_8+0x42>
jmp    1156 <path_016_expected_8+0x56>
cmpl   $0x0,-0x4(%rbp)
jle    113d <path_016_expected_8+0x3d>
jmp    116a <path_016_expected_8+0x6a>
jmp    115b <path_016_expected_8+0x5b>
cmpl   $0xa,-0x4(%rbp)
jle    1151 <path_016_expected_8+0x51>
jmp    116a <path_016_expected_8+0x6a>
jmp    115b <path_016_expected_8+0x5b>
jmp    115b <path_016_expected_8+0x5b>
cmpl   $0x0,-0x8(%rbp)
je     116a <path_016_expected_8+0x6a>
jmp    116a <path_016_expected_8+0x6a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @path_016_expected_8(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
switch i32 %5, label %16 [
i32 0, label %6
i32 1, label %11
]
6: ; preds = %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %21
10: ; preds = %6
br label %17
11: ; preds = %2
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 10
br i1 %13, label %14, label %15
14: ; preds = %11
br label %21
15: ; preds = %11
br label %17
16: ; preds = %2
br label %17
17: ; preds = %16, %15, %10
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
br label %21
21: ; preds = %9, %14, %20, %17
ret void
}

LLVM IR (-O2):
define void @path_016_expected_8(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ clock();
clock_t getBeginTime() {
  clock_t beginTime;
  clock_t lastTime = clock();
  while ((beginTime = clock()) == lastTime)
    ;
  return beginTime;
}


x86 assembly (clang, -O0):
<getBeginTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x4(%rbp)
cmp    -0x8(%rbp),%eax
jne    113a <getBeginTime+0x2a>
jmp    1122 <getBeginTime+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBeginTime>:
push   %rbx
xor    %eax,%eax
call   1030 <clock@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <clock@plt>
cmp    %ebx,%eax
je     1120 <getBeginTime+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getBeginTime() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @clock()
store i32 %3, i32* %2
br label %4
4: ; preds = %8, %0
%5 = call i32 (...) @clock()
store i32 %5, i32* %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @getBeginTime() {
%1 = tail call i32 (...) @clock()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @clock()
%4 = icmp eq i32 %3, %1
br i1 %4, label %2, label %5
5: ; preds = %2
ret i32 %3
}
__attribute__((always_)) void func1(int x) {
  x++;
  return;
}


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

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

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

LLVM IR (-O2):
define void @func1(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *id2str(int i) {
  static char buff[5];
  if (i < 0)
    return ("x");
  else {
    sprintf(buff, "%d", i);
    return buff;
  }
}


x86 assembly (clang, -O0):
<id2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1135 <id2str+0x25>
lea    0xed4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1156 <id2str+0x46>
mov    -0xc(%rbp),%edx
lea    0x2eea(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ed7(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id2str>:
push   %rbx
test   %edi,%edi
js     112f <id2str+0x1f>
mov    %edi,%edx
lea    0x2f0b(%rip),%rbx
lea    0xedd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
jmp    1136 <id2str+0x26>
lea    0xeca(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@id2str.buff = internal global [5 x i8] zeroinitializer
@.str = [2 x i8] c"x\00"
@.str.1 = [3 x i8] c"%d\00"
define i8* @id2str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @sprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @id2str.buff, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @id2str.buff, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@id2str.buff = internal global [5 x i8] zeroinitializer
@.str = [2 x i8] c"x\00"
@.str.1 = [3 x i8] c"%d\00"
define i8* @id2str(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @id2str.buff, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @id2str.buff, i64 0, i64 0), %3 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
void clear_memory(int array[1024]) {
  int elem = 0;
  for (; elem < 1024; ++elem) {
    array[elem] = 0;
  }
}


x86 assembly (clang, -O0):
<clear_memory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    1139 <clear_memory+0x39>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clear_memory+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_memory>:
push   %rax
mov    $0x1000,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clear_memory(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
/* Variables and functions */
int ex_inquire(int, int, int *, float *, char *);
int ex_inquire_int(int exoid, int req_info) {
  char *cdummy = 0;
  float fdummy = 0;
  int ret_val = 0;
  int error = ex_inquire(exoid, req_info, &ret_val, &fdummy, cdummy);
  if (error < 0)
    ret_val = error;
  return ret_val;
}


x86 assembly (clang, -O0):
<ex_inquire_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%r8
lea    -0x18(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1030 <ex_inquire@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    115f <ex_inquire_int+0x4f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ex_inquire_int>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
mov    %rsp,%rdx
lea    0x4(%rsp),%rcx
xor    %r8d,%r8d
call   1030 <ex_inquire@plt>
test   %eax,%eax
js     1137 <ex_inquire_int+0x27>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ex_inquire_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
store float 0.000000e+00, float* %6
store i32 0, i32* %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = call i32 @ex_inquire(i32 %9, i32 %10, i32* %7, float* %6, i8* %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32, i32* %8
store i32 %16, i32* %7
br label %17
17: ; preds = %15, %2
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @ex_inquire_int(i32 %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = call i32 @ex_inquire(i32 %0, i32 %1, i32* %4, float* %3, i8* null)
%8 = icmp slt i32 %7, 0
%9 = load i32, i32* %4
%10 = select i1 %8, i32 %7, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int, int);
void i830_debug_hvtotal(char *result, int len, int reg, uint32_t val,
                        uint32_t devid) {
  snprintf(result, len, "%d active, %d total", (val & 0xffff) + 1,
           ((val & 0xffff0000) >> 16) + 1);
}


x86 assembly (clang, -O0):
<i830_debug_hvtotal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%ecx
and    $0xffff,%ecx
add    $0x1,%ecx
mov    -0x14(%rbp),%r8d
and    $0xffff0000,%r8d
shr    $0x10,%r8d
add    $0x1,%r8d
lea    0xeaa(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i830_debug_hvtotal>:
movzwl %cx,%eax
add    $0x1,%eax
shr    $0x10,%ecx
lea    0x1(%rcx),%r8d
lea    0xedc(%rip),%rdx
mov    %eax,%ecx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"%d active, %d total\00"
define void @i830_debug_hvtotal(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %9
%14 = and i32 %13, 65535
%15 = add nsw i32 %14, 1
%16 = load i32, i32* %9
%17 = and i32 %16, -65536
%18 = lshr i32 %17, 16
%19 = add i32 %18, 1
%20 = call i32 @snprintf(i8* %11, i32 %12, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"%d active, %d total\00"
define void @i830_debug_hvtotal(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = and i32 %3, 65535
%7 = add nuw nsw i32 %6, 1
%8 = lshr i32 %3, 16
%9 = add nuw nsw i32 %8, 1
%10 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ make_pair_matrix();
int /*<<< orphan*/ scale_pf_params(unsigned int);
void update_co_pf_params(int length) {
  make_pair_matrix();
  scale_pf_params((unsigned)length);
}


x86 assembly (clang, -O0):
<update_co_pf_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <make_pair_matrix@plt>
mov    -0x4(%rbp),%edi
call   1030 <scale_pf_params@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_co_pf_params>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <make_pair_matrix@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <scale_pf_params@plt>

LLVM IR (-O0):
define void @update_co_pf_params(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @make_pair_matrix()
%4 = load i32, i32* %2
%5 = call i32 @scale_pf_params(i32 %4)
ret void
}

LLVM IR (-O2):
define void @update_co_pf_params(i32 %0) {
%2 = tail call i32 (...) @make_pair_matrix()
%3 = tail call i32 @scale_pf_params(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void street(int number) { printf("street: %d\n", number); }


x86 assembly (clang, -O0):
<street>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"street: %d\0A\00"
define void @street(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"street: %d\0A\00"
define void @street(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int sys$flush(struct _fab *fab, void *err, void *suc) {
  return ({
    unsigned long resultvar;
    register long int _a3 asm("rdx") = (long)(suc);
    register long int _a2 asm("rsi") = (long)(err);
    register long int _a1 asm("rdi") = (long)(fab);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x82\n\t"
                 : "=a"(resultvar)
                 : "i"(11), "r"(_a1), "r"(_a2), "r"(_a3)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$flush>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0xb,%rax
int    $0x82
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$flush>:
mov    $0xb,%rax
int    $0x82
ret

LLVM IR (-O0):
%struct._fab = type opaque
define i32 @"sys$flush"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca %struct._fab*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store %struct._fab* %0, %struct._fab** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%12 = load i8*, i8** %6
%13 = ptrtoint i8* %12 to i64
store i64 %13, i64* %8
%14 = load i8*, i8** %5
%15 = ptrtoint i8* %14 to i64
store i64 %15, i64* %9
%16 = load %struct._fab*, %struct._fab** %4
%17 = ptrtoint %struct._fab* %16 to i64
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 11, i64 %18, i64 %19, i64 %20)
store i64 %21, i64* %7
%22 = load i64, i64* %7
store i64 %22, i64* %11
%23 = load i64, i64* %11
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
%struct._fab = type opaque
define i32 @"sys$flush"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint %struct._fab* %0 to i64
%7 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 11, i64 %6, i64 %5, i64 %4)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
scalar_t__ isdigit(char);
char toupper(char);
unsigned hex2int(char c) {
  c = toupper(c);
  return isdigit(c) ? c - '0' : c - 'A' + 10;
}


x86 assembly (clang, -O0):
<hex2int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <toupper@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     115c <hex2int+0x3c>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1169 <hex2int+0x49>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2int>:
push   %rbx
call   1040 <toupper@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1030 <isdigit@plt>
lea    -0x30(%rbx),%ecx
add    $0xffffffc9,%ebx
test   %rax,%rax
cmovne %ecx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hex2int(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call signext i8 @toupper(i8 signext %3)
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = call i64 @isdigit(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %10, 48
br label %17
12: ; preds = %1
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 65
%16 = add nsw i32 %15, 10
br label %17
17: ; preds = %12, %8
%18 = phi i32 [ %11, %8 ], [ %16, %12 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @hex2int(i8 signext %0) {
%2 = tail call signext i8 @toupper(i8 signext %0)
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
%5 = sext i8 %2 to i32
%6 = select i1 %4, i32 -55, i32 -48
%7 = add nsw i32 %6, %5
ret i32 %7
}
void GB_ISGE_f_FP64(double *z, const double *x, const double *y) {
  (*z) = ((*x) >= (*y));
}


x86 assembly (clang, -O0):
<GB_ISGE_f_FP64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_ISGE_f_FP64>:
movsd  (%rdx),%xmm0
cmplesd (%rsi),%xmm0
movsd  0xeef(%rip),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @GB_ISGE_f_FP64(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = load double, double* %7
%9 = load double*, double** %6
%10 = load double, double* %9
%11 = fcmp oge double %8, %10
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to double
%14 = load double*, double** %4
store double %13, double* %14
ret void
}

LLVM IR (-O2):
define void @GB_ISGE_f_FP64(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fcmp oge double %4, %5
%7 = uitofp i1 %6 to double
store double %7, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void jsoo_extract() { exit(1); }


x86 assembly (clang, -O0):
<jsoo_extract>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<jsoo_extract>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @jsoo_extract() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @jsoo_extract() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
int edflib_version(void) { return (110); }


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

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

LLVM IR (-O0):
define i32 @edflib_version() {
ret i32 110
}

LLVM IR (-O2):
define i32 @edflib_version() {
ret i32 110
}
char *before_tag(theword)
char *theword;
{
  int count = 0;
  while (theword[count] != '\0' && theword[count] != '/')
    count++;
  if (theword[count] == '/')
    theword[count] = '\0';
  return (theword);
}


x86 assembly (clang, -O0):
<before_tag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     113e <before_tag+0x3e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114e <before_tag+0x4e>
jmp    115c <before_tag+0x5c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <before_tag+0xf>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    117d <before_tag+0x7d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<before_tag>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rax,%rcx,1),%edx
test   %dl,%dl
je     1129 <before_tag+0x29>
cmp    $0x2f,%dl
je     1123 <before_tag+0x23>
add    $0x1,%rcx
jmp    1110 <before_tag+0x10>
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

LLVM IR (-O0):
define i8* @before_tag(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %22, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 47
br label %20
20: ; preds = %12, %4
%21 = phi i1 [ false, %4 ], [ %19, %12 ]
br i1 %21, label %22, label %25
22: ; preds = %20
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %4
25: ; preds = %20
%26 = load i8*, i8** %2
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 47
br i1 %32, label %33, label %38
33: ; preds = %25
%34 = load i8*, i8** %2
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %34, i64 %36
store i8 0, i8* %37
br label %38
38: ; preds = %33, %25
%39 = load i8*, i8** %2
ret i8* %39
}

LLVM IR (-O2):
define i8* @before_tag(i8* returned %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 47, label %8
i8 0, label %11
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
%9 = and i64 %3, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %2, %8
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ arrayPromotion(char **);
int /*<<< orphan*/ functionPromotion(int /*<<< orphan*/ (*)(char **));
int whatever(int argc, char *argv[]) {
  arrayPromotion(argv);
  functionPromotion(arrayPromotion);
}


x86 assembly (clang, -O0):
<whatever>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <arrayPromotion@plt>
mov    0x2eb9(%rip),%rdi
call   1030 <functionPromotion@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whatever>:
push   %rax
mov    %rsi,%rdi
call   1040 <arrayPromotion@plt>
mov    0x2ec8(%rip),%rdi
pop    %rax
jmp    1030 <functionPromotion@plt>

LLVM IR (-O0):
define i32 @whatever(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = call i32 @arrayPromotion(i8** %6)
%8 = call i32 @functionPromotion(i32 (i8**)* @arrayPromotion)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @whatever(i32 %0, i8** %1) {
%3 = tail call i32 @arrayPromotion(i8** %1)
%4 = tail call i32 @functionPromotion(i32 (i8**)* @arrayPromotion)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ back();
int /*<<< orphan*/ linear_distance_mm(unsigned int);
void back_mm(unsigned int DistanceInMM) {
  back();
  linear_distance_mm(DistanceInMM);
}


x86 assembly (clang, -O0):
<back_mm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <back@plt>
mov    -0x4(%rbp),%edi
call   1040 <linear_distance_mm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<back_mm>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <back@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <linear_distance_mm@plt>

LLVM IR (-O0):
define void @back_mm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @back()
%4 = load i32, i32* %2
%5 = call i32 @linear_distance_mm(i32 %4)
ret void
}

LLVM IR (-O2):
define void @back_mm(i32 %0) {
%2 = tail call i32 (...) @back()
%3 = tail call i32 @linear_distance_mm(i32 %0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
int main(void) {
  char chr = '2';
  while (1)
    write(STDOUT_FILENO, &chr, 1);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x32,-0x5(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    -0x5(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
jmp    1123 <main+0x13>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movb   $0x32,0x7(%rsp)
mov    0x2ed0(%rip),%r14
lea    0x7(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
jmp    1130 <main+0x20>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 50, i8* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* @STDOUT_FILENO
%5 = call i32 @write(i32 %4, i8* %2, i32 1)
br label %3
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i8
store i8 50, i8* %1
br label %2
2: ; preds = %2, %0
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* %1, i32 1)
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void *runner(void *arg) {
  (void)arg;
  while (1)
    sleep(1);
  return NULL;
}


x86 assembly (clang, -O0):
<runner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    111c <runner+0xc>

x86 assembly (clang, -O2):
<runner>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <runner+0x10>

LLVM IR (-O0):
define i8* @runner(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
br label %4
4: ; preds = %1, %4
%5 = call i32 @sleep(i32 1)
br label %4
}

LLVM IR (-O2):
define noalias i8* @runner(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @sleep(i32 1)
br label %2
}
/* Variables and functions */
bool CCFGRead_DIS_GPRAM(void) {
  return (
      ((*((volatile unsigned long *)(0x50003000 + 0x00001FB0))) & 0x00000004) >>
      2);
}


x86 assembly (clang, -O0):
<CCFGRead_DIS_GPRAM>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50004fb0,%eax
mov    (%rax),%rax
and    $0x4,%rax
shr    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CCFGRead_DIS_GPRAM>:
mov    0x50004fb0,%rax
50
shr    $0x2,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @CCFGRead_DIS_GPRAM() {
%1 = load volatile i64, i64* inttoptr (i64 1342197680 to i64*)
%2 = and i64 %1, 4
%3 = lshr i64 %2, 2
%4 = trunc i64 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @CCFGRead_DIS_GPRAM() {
%1 = load volatile i64, i64* inttoptr (i64 1342197680 to i64*)
%2 = trunc i64 %1 to i32
%3 = lshr i32 %2, 2
%4 = and i32 %3, 1
ret i32 %4
}
int test_imm_87uint8_mem(unsigned char *val) {
  return ((*val) & (0x87 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_87uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x87,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_87uint8_mem>:
testb  $0x87,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_87uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -121
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int do_930() { return 930; }


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

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

LLVM IR (-O0):
define i32 @do_930() {
ret i32 930
}

LLVM IR (-O2):
define i32 @do_930() {
ret i32 930
}
void SNPRINTF(char *s, ...) {}


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

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

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

LLVM IR (-O2):
define void @SNPRINTF(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double nextafterl(long double x, long double y) {
  return __infer_nondet_long_double();
}


x86 assembly (clang, -O0):
<nextafterl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @nextafterl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @nextafterl(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sentence;

/* Variables and functions */
int compute_vowel_count(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(void) {
  char sentence[81];
  printf("Enter a sentence: ");
  fgets(sentence, sizeof(sentence), stdin);
  printf("That sentence contains %d vowels.\n", compute_vowel_count(sentence));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e90(%rip),%rax
mov    (%rax),%edx
mov    $0x51,%esi
call   1040 <fgets@plt>
lea    -0x60(%rbp),%rdi
call   1050 <compute_vowel_count@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x51,%esi
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1050 <compute_vowel_count@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter a sentence: \00"
@stdin = global i32 0
@.str.1 = [35 x i8] c"That sentence contains %d vowels.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 81, i32 %5)
%7 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%8 = call i32 @compute_vowel_count(i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter a sentence: \00"
@stdin = global i32 0
@.str.1 = [35 x i8] c"That sentence contains %d vowels.\0A\00"
define i32 @main() {
%1 = alloca [81 x i8]
%2 = getelementptr inbounds [81 x i8], [81 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 81, i32 %4)
%6 = call i32 @compute_vowel_count(i8* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
double getweightedmean_double(int, double *, double *);
double getweightedmean(int n, double *data, double *sig) {
  return getweightedmean_double(n, data, sig);
}


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

x86 assembly (clang, -O2):
<getweightedmean>:
jmp    1030 <getweightedmean_double@plt>

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

LLVM IR (-O2):
define double @getweightedmean(i32 %0, double* %1, double* %2) {
%4 = tail call double @getweightedmean_double(i32 %0, double* %1, double* %2)
ret double %4
}
const char *str_stmt_noop() { return "noop"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"noop\00"
define i8* @str_stmt_noop() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void report(char *mess) {
  fprintf(stderr, "lpd: %s: %s\n", mess, strerror(errno));
}


x86 assembly (clang, -O0):
<report>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebc(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"lpd: %s: %s\0A\00"
@errno = global i32 0
define void @report(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"lpd: %s: %s\0A\00"
@errno = global i32 0
define void @report(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ bswap16(int /*<<< orphan*/);
void cpu_to_be16s(uint16_t *p) { *p = bswap16(*p); }


x86 assembly (clang, -O0):
<cpu_to_be16s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <bswap16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_to_be16s>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <bswap16@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @cpu_to_be16s(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @bswap16(i32 %4)
%6 = load i32*, i32** %2
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @cpu_to_be16s(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @bswap16(i32 %2)
store i32 %3, i32* %0
ret void
}
void *upd_cast(const void *data) { return (void *)data; }


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

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

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

LLVM IR (-O2):
define i8* @upd_cast(i8* readnone returned %0) {
ret i8* %0
}
int q2(int j, int a1, int a2, int a3, int a4, int a5, int a6) { return j; }


x86 assembly (clang, -O0):
<q2>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q2>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @q2(i32 returned %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;

/* Variables and functions */
int /*<<< orphan*/ do_KeyPress(int /*<<< orphan*/ *);
void do_KeyRelease(XEvent *eventp) { do_KeyPress(eventp); }


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

x86 assembly (clang, -O2):
<do_KeyRelease>:
jmp    1030 <do_KeyPress@plt>

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

LLVM IR (-O2):
define void @do_KeyRelease(i32* %0) {
%2 = tail call i32 @do_KeyPress(i32* %0)
ret void
}
void ex2() {}


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

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

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

LLVM IR (-O2):
define void @ex2() {
ret void
}
void rotate(int *data, int n) {
  int i;
  int first = data[0];
  for (i = 0; i < n; ++i)
    data[i] = data[i + 1];
  data[n] = first;
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1150 <rotate+0x50>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111b <rotate+0x1b>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%rbx
mov    (%rdi),%r14d
test   %esi,%esi
jle    1132 <rotate+0x22>
lea    0x4(%rbx),%rsi
mov    %ebp,%edx
shl    $0x2,%rdx
mov    %rbx,%rdi
call   1030 <memmove@plt>
movslq %ebp,%rax
mov    %r14d,(%rbx,%rax,4)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @rotate(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = bitcast i32* %0 to i8*
%7 = getelementptr i32, i32* %0, i64 1
%8 = bitcast i32* %7 to i8*
%9 = zext i32 %1 to i64
%10 = shl nuw nsw i64 %9, 2
br label %11
11: ; preds = %5, %2
%12 = sext i32 %1 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
store i32 %3, i32* %13
ret void
}