xunge/DecIR huggingface dataset:
/* Variables and functions */
float ceilf(float);
float __glsl_ceil(float x) { return ceilf(x); }


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

x86 assembly (clang, -O2):
<__glsl_ceil>:
jmp    1030 <ceilf@plt>

LLVM IR (-O0):
define float @__glsl_ceil(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.ceil.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @__glsl_ceil(float %0) {
%2 = tail call float @llvm.ceil.f32(float %0)
ret float %2
}
unsigned long csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr,
                                 unsigned short len, unsigned short proto,
                                 unsigned int sum) {
  __asm__("addl %1, %0	;\n"
          "adcl %2, %0	;\n"
          "adcl %3, %0	;\n"
          "adcl $0, %0	;\n"
          : "=r"(sum)
          : "g"(daddr), "g"(saddr), "g"((ntohs(len) << 16) + proto * 256),
            "0"(sum));
  return sum;
}


x86 assembly (clang, -O0):
<csum_tcpudp_nofold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
movzwl -0x12(%rbp),%edi
mov    $0x0,%al
call   1030 <ntohs@plt>
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    %eax,%ecx
shl    $0x10,%ecx
movzwl -0x14(%rbp),%eax
shl    $0x8,%eax
add    %eax,%ecx
mov    -0x18(%rbp),%eax
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
add    -0x20(%rbp),%eax
adc    -0x28(%rbp),%eax
adc    -0x2c(%rbp),%eax
adc    $0x0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i64 @csum_tcpudp_nofold(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i16 %2, i16* %8
store i16 %3, i16* %9
store i32 %4, i32* %10
%11 = load i64, i64* %7
%12 = load i64, i64* %6
%13 = load i16, i16* %8
%14 = zext i16 %13 to i32
%15 = call i32 (i32, ...) bitcast (i32 (...)* @ntohs to i32 (i32, ...)*)(i32 %14)
%16 = shl i32 %15, 16
%17 = load i16, i16* %9
%18 = zext i16 %17 to i32
%19 = mul nsw i32 %18, 256
%20 = add nsw i32 %16, %19
%21 = load i32, i32* %10
%22 = call i32 asm "addl $1, $0\09;\0Aadcl $2, $0\09;\0Aadcl $3, $0\09;\0Aadcl $$0, $0\09;\0A", "=r,imr,imr,imr,0,~{dirflag},~{fpsr},~{flags}"(i64 %11, i64 %12, i32 %20, i32 %21)
store i32 %22, i32* %10
%23 = load i32, i32* %10
%24 = zext i32 %23 to i64
ret i64 %24
}

LLVM IR (-O2):
int subtract(int *a, int b) { return *a - b; }


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @subtract(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @subtract(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = sub nsw i32 %3, %1
ret i32 %4
}
long fib(int n) {
  long result;
  if (n == 0)
    result = 0;
  else if (n == 1)
    result = 1;
  else
    result = fib(n - 1) + fib(n - 2);
  return result;
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1132 <fib+0x22>
movq   $0x0,-0x10(%rbp)
jmp    1176 <fib+0x66>
cmpl   $0x1,-0x4(%rbp)
jne    1149 <fib+0x39>
movq   $0x1,-0x10(%rbp)
jmp    1171 <fib+0x61>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1176 <fib+0x66>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %r14d,%r14d
test   %ebx,%ebx
je     1137 <fib+0x27>
nopl   (%rax)
cmp    $0x1,%ebx
je     113b <fib+0x2b>
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    %rax,%r14
add    $0xfffffffe,%ebx
test   %ebx,%ebx
jne    1120 <fib+0x10>
xor    %eax,%eax
jmp    1140 <fib+0x30>
mov    $0x1,%eax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fib(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i64 [ 0, %1 ], [ %9, %5 ]
%4 = phi i32 [ %0, %1 ], [ %8, %5 ]
switch i32 %4, label %5 [
i32 0, label %10
i32 1, label %11
]
5: ; preds = %2
%6 = add nsw i32 %4, -1
%7 = tail call i64 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i64 %7, %3
br label %2
10: ; preds = %2
br label %11
11: ; preds = %2, %10
%12 = phi i64 [ 0, %10 ], [ 1, %2 ]
%13 = add nsw i64 %12, %3
ret i64 %13
}
/* Variables and functions */
double exp(double);
double sinh(double x) { return (exp(x) - exp(-x)) / 2.0; }


x86 assembly (clang, -O0):
<sinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinh>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
xorpd  0xece(%rip),%xmm0
call   1030 <exp@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xec7(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @sinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
%5 = load double, double* %2
%6 = fneg double %5
%7 = call double @exp(double %6)
%8 = fsub double %4, %7
%9 = fdiv double %8, 2.000000e+00
ret double %9
}

LLVM IR (-O2):
define double @sinh(double %0) {
%2 = tail call double @exp(double %0)
%3 = fneg double %0
%4 = tail call double @exp(double %3)
%5 = fsub double %2, %4
%6 = fmul double %5, 5.000000e-01
ret double %6
}
void list_delete_item() {}


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

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

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

LLVM IR (-O2):
define void @list_delete_item() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_memory();
int /*<<< orphan*/ init_undo();
int /*<<< orphan*/ interpret();
int /*<<< orphan*/ os_init_screen();
int /*<<< orphan*/ os_process_arguments(int, char **);
int /*<<< orphan*/ os_reset_screen();
int /*<<< orphan*/ reset_memory();
int /*<<< orphan*/ z_restart();
int main(int argc, char *argv[]) {
  os_process_arguments(argc, argv);
  init_memory();
  os_init_screen();
  init_undo();
  z_restart();
  interpret();
  reset_memory();
  os_reset_screen();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <os_process_arguments@plt>
mov    $0x0,%al
call   1060 <init_memory@plt>
mov    $0x0,%al
call   1030 <os_init_screen@plt>
mov    $0x0,%al
call   1080 <init_undo@plt>
mov    $0x0,%al
call   1090 <z_restart@plt>
mov    $0x0,%al
call   10a0 <interpret@plt>
mov    $0x0,%al
call   1070 <reset_memory@plt>
mov    $0x0,%al
call   1050 <os_reset_screen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <os_process_arguments@plt>
xor    %eax,%eax
call   1060 <init_memory@plt>
xor    %eax,%eax
call   1030 <os_init_screen@plt>
xor    %eax,%eax
call   1080 <init_undo@plt>
xor    %eax,%eax
call   1090 <z_restart@plt>
xor    %eax,%eax
call   10a0 <interpret@plt>
xor    %eax,%eax
call   1070 <reset_memory@plt>
xor    %eax,%eax
call   1050 <os_reset_screen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @os_process_arguments(i32 %6, i8** %7)
%9 = call i32 (...) @init_memory()
%10 = call i32 (...) @os_init_screen()
%11 = call i32 (...) @init_undo()
%12 = call i32 (...) @z_restart()
%13 = call i32 (...) @interpret()
%14 = call i32 (...) @reset_memory()
%15 = call i32 (...) @os_reset_screen()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @os_process_arguments(i32 %0, i8** %1)
%4 = tail call i32 (...) @init_memory()
%5 = tail call i32 (...) @os_init_screen()
%6 = tail call i32 (...) @init_undo()
%7 = tail call i32 (...) @z_restart()
%8 = tail call i32 (...) @interpret()
%9 = tail call i32 (...) @reset_memory()
%10 = tail call i32 (...) @os_reset_screen()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ show(char *, int /*<<< orphan*/, char);
int /*<<< orphan*/ write_server(char *, int /*<<< orphan*/);
void filter_client_data(char *data, ssize_t size) {
  show(data, size, '>');
  write_server(data, size);
}


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

x86 assembly (clang, -O2):
<filter_client_data>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x3e,%edx
call   1040 <show@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write_server@plt>

LLVM IR (-O0):
define void @filter_client_data(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @show(i8* %5, i32 %6, i8 signext 62)
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @write_server(i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @filter_client_data(i8* %0, i32 %1) {
%3 = tail call i32 @show(i8* %0, i32 %1, i8 signext 62)
%4 = tail call i32 @write_server(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void **prj_newlist(int len) {
  void **list = (void **)malloc(sizeof(void *) * (len + 1));
  list[len] = NULL;
  return list;
}


x86 assembly (clang, -O0):
<prj_newlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prj_newlist>:
push   %rbx
mov    %edi,%ebx
lea    0x8(,%rbx,8),%edi
call   1030 <malloc@plt>
movslq %ebx,%rcx
movq   $0x0,(%rax,%rcx,8)
pop    %rbx
ret

LLVM IR (-O0):
define i8** @prj_newlist(i32 %0) {
%2 = alloca i32
%3 = alloca i8**
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = mul i64 8, %6
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8**
store i8** %10, i8*** %3
%11 = load i8**, i8*** %3
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
store i8* null, i8** %14
%15 = load i8**, i8*** %3
ret i8** %15
}

LLVM IR (-O2):
define i8** @prj_newlist(i32 %0) {
%2 = shl i32 %0, 3
%3 = add i32 %2, 8
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8**
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds i8*, i8** %5, i64 %6
store i8* null, i8** %7
ret i8** %5
}
/* Variables and functions */
int /*<<< orphan*/ output(char *, int);
int /*<<< orphan*/ sscanf(char const *, char *, int *);
void printCPUxNiceInfo(const char *cmd) {
  int id;
  sscanf(cmd + 7, "%d", &id);
  output("CPU %d Nice Load\t0\t100\t%%\n", id + 1);
}


x86 assembly (clang, -O0):
<printCPUxNiceInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x7,%rdi
lea    0xec5(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
lea    0xeb2(%rip),%rdi
call   1030 <output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCPUxNiceInfo>:
push   %rax
add    $0x7,%rdi
lea    0xed4(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1040 <sscanf@plt>
mov    0x4(%rsp),%esi
add    $0x1,%esi
lea    0xebf(%rip),%rdi
call   1030 <output@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [27 x i8] c"CPU %d Nice Load\090\09100\09%%\0A\00"
define void @printCPUxNiceInfo(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 7
%6 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i32 @output(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [27 x i8] c"CPU %d Nice Load\090\09100\09%%\0A\00"
define void @printCPUxNiceInfo(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %0, i64 7
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = call i32 @output(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwide(int /*<<< orphan*/ *, int);
void uninitvar_fwide(void) {
  FILE *stream;
  int mode;
  (void)fwide(stream, mode);
}


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

x86 assembly (clang, -O2):
<uninitvar_fwide>:
jmp    1030 <fwide@plt>

LLVM IR (-O0):
define void @uninitvar_fwide() {
%1 = alloca i32*
%2 = alloca i32
%3 = load i32*, i32** %1
%4 = load i32, i32* %2
%5 = call i32 @fwide(i32* %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @uninitvar_fwide() {
%1 = tail call i32 @fwide(i32* undef, i32 undef)
ret void
}
void emptyIT() { return; }


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

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

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

LLVM IR (-O2):
define void @emptyIT() {
ret void
}
/* Variables and functions */
char *SeqUtil_addRes(char *, int, char);
char *SeqUtil_addNs(char *seq, int length) {
  return SeqUtil_addRes(seq, length, 'N');
}


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

x86 assembly (clang, -O2):
<SeqUtil_addNs>:
mov    $0x4e,%edx
jmp    1030 <SeqUtil_addRes@plt>

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

LLVM IR (-O2):
define i8* @SeqUtil_addNs(i8* %0, i32 %1) {
%3 = tail call i8* @SeqUtil_addRes(i8* %0, i32 %1, i8 signext 78)
ret i8* %3
}
void kasan_remove_zero_shadow(void *start, unsigned long size) {}


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

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

LLVM IR (-O0):
define void @kasan_remove_zero_shadow(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @kasan_remove_zero_shadow(i8* nocapture %0, i64 %1) {
ret void
}
int tegra_set_wake_source(int wake, int wake_int) { return 0; }


x86 assembly (clang, -O0):
<tegra_set_wake_source>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @tegra_set_wake_source(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ IntDisable(int /*<<< orphan*/);
int /*<<< orphan*/ IntUnregister(int /*<<< orphan*/);
int /*<<< orphan*/ _SysExcIntNumberGet();
void SysExcIntUnregister(void) {
  uint32_t ui32Int;
  ui32Int = _SysExcIntNumberGet();
  ;
  IntDisable(ui32Int);
  IntUnregister(ui32Int);
}


x86 assembly (clang, -O0):
<SysExcIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <_SysExcIntNumberGet@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <IntDisable@plt>
mov    -0x4(%rbp),%edi
call   1050 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysExcIntUnregister>:
push   %rbx
xor    %eax,%eax
call   1030 <_SysExcIntNumberGet@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <IntDisable@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <IntUnregister@plt>

LLVM IR (-O0):
define void @SysExcIntUnregister() {
%1 = alloca i32
%2 = call i32 (...) @_SysExcIntNumberGet()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @IntDisable(i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @IntUnregister(i32 %5)
ret void
}

LLVM IR (-O2):
define void @SysExcIntUnregister() {
%1 = tail call i32 (...) @_SysExcIntNumberGet()
%2 = tail call i32 @IntDisable(i32 %1)
%3 = tail call i32 @IntUnregister(i32 %1)
ret void
}
/* Variables and functions */
int among(char *, int);
int issign(int c) { return among("+-", c); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"+-\00"
define i32 @issign(i32 %0) {
%2 = tail call i32 @among(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
/* Variables and functions */
int zmaster_main(int, char **);
int main(int argc, char **argv) { return zmaster_main(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <zmaster_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @zmaster_main(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t hash6432(uint64_t key) {
  key = (~key) + (key << 18);
  key = key ^ (key >> 31);
  key = key * 21;
  key = key ^ (key >> 11);
  key = key + (key << 6);
  key = key ^ (key >> 22);
  return (uint32_t)key;
}


x86 assembly (clang, -O0):
<hash6432>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x4(%rbp),%ecx
shl    $0x12,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
imul   $0x15,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0xb,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x6,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x16,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash6432>:
mov    %edi,%eax
not    %eax
shl    $0x12,%edi
add    %eax,%edi
mov    %edi,%eax
sar    $0x1f,%eax
xor    %edi,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rcx,4),%eax
mov    %eax,%ecx
sar    $0xb,%ecx
xor    %eax,%ecx
mov    %ecx,%edx
shl    $0x6,%edx
add    %ecx,%edx
mov    %edx,%eax
sar    $0x16,%eax
xor    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash6432(i32 %0) {
%2 = xor i32 %0, -1
%3 = shl i32 %0, 18
%4 = add nsw i32 %3, %2
%5 = ashr i32 %4, 31
%6 = xor i32 %5, %4
%7 = mul nsw i32 %6, 21
%8 = ashr i32 %7, 11
%9 = xor i32 %8, %7
%10 = mul i32 %9, 65
%11 = ashr i32 %10, 22
%12 = xor i32 %11, %10
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ cbreak();
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_cbreak(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(cbreak());
}


x86 assembly (clang, -O0):
<cmd_cbreak>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_cbreak+0x27>
jmp    117f <cmd_cbreak+0x3f>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    %eax,%edi
call   1040 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_cbreak>:
push   %rax
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_cbreak+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1060 <report_count@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <report_return@plt>

LLVM IR (-O0):
define void @cmd_cbreak(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 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @cbreak()
%12 = call i32 @report_return(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_cbreak(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @cbreak()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int util() {
  printf("Hello from util!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Hello from util!\0A\00"
define i32 @util() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"Hello from util!\00"
define i32 @util() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ min_down(long long *, int, int);
long long min_del(long long arr[], int i, int n) {
  long long res = arr[1];
  arr[1] = arr[n];
  n--;
  min_down(arr, 1, n);
  return res;
}


x86 assembly (clang, -O0):
<min_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x1,%esi
call   1030 <min_down@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_del>:
push   %rbx
mov    0x8(%rdi),%rbx
movslq %edx,%rdx
mov    (%rdi,%rdx,8),%rax
mov    %rax,0x8(%rdi)
add    $0xffffffff,%edx
mov    $0x1,%esi
call   1030 <min_down@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @min_del(i64* %0, i32 %1, i32 %2) {
%4 = alloca i64*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i64* %0, i64** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i64*, i64** %4
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
store i64 %10, i64* %7
%11 = load i64*, i64** %4
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i64, i64* %11, i64 %13
%15 = load i64, i64* %14
%16 = load i64*, i64** %4
%17 = getelementptr inbounds i64, i64* %16, i64 1
store i64 %15, i64* %17
%18 = load i32, i32* %6
%19 = add nsw i32 %18, -1
store i32 %19, i32* %6
%20 = load i64*, i64** %4
%21 = load i32, i32* %6
%22 = call i32 @min_down(i64* %20, i32 1, i32 %21)
%23 = load i64, i64* %7
ret i64 %23
}

LLVM IR (-O2):
define i64 @min_del(i64* %0, i32 %1, i32 %2) {
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 %6
%8 = load i64, i64* %7
store i64 %8, i64* %4
%9 = add nsw i32 %2, -1
%10 = tail call i32 @min_down(i64* %0, i32 1, i32 %9)
ret i64 %5
}
backup(name) register char *name;
{
  char back[80];
  char *p;
  strcpy(back, name);
  strcat(back, "~");
  unlink(back);
  rename(name, back);
}


x86 assembly (clang, -O0):
<backup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x0,%al
call   1050 <rename@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backup>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
movw   $0x7e,(%rsp,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <unlink@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <rename@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"~\00"
define i32 @backup(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [80 x i8]
%5 = alloca i8*
store i8* %0, i8** %3
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i8* @strcpy(i8* %6, i8* %7)
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%10 = call i8* @strcat(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %11)
%13 = load i8*, i8** %3
%14 = getelementptr inbounds [80 x i8], [80 x i8]* %4, i64 0, i64 0
%15 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @rename to i32 (i8*, i8*, ...)*)(i8* %13, i8* %14)
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @backup(i8* %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i8* @strcpy(i8* %3, i8* dereferenceable(1) %0)
%5 = call i64 @strlen(i8* %3)
%6 = getelementptr [80 x i8], [80 x i8]* %2, i64 0, i64 %5
%7 = bitcast i8* %6 to i16*
store i16 126, i16* %7
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %3)
%9 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @rename to i32 (i8*, i8*, ...)*)(i8* %0, i8* %3)
ret i32 undef
}
int main(void) {
  int x;
  int y;
  int z;
  int *tmp;
  {
    if (x) {
      tmp = &y;
    } else {
      tmp = &z;
    }
    x++;
    return ((int)(tmp - &x));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1122 <main+0x22>
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112a <main+0x2a>
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
lea    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    -0x4(%rsp),%rax
neg    %rax
add    %rsp,%rax
add    $0xfffffffffffffff8,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 0, i32* %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32* %3, i32** %5
br label %10
9: ; preds = %0
store i32* %4, i32** %5
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
%13 = load i32*, i32** %5
%14 = ptrtoint i32* %13 to i64
%15 = ptrtoint i32* %2 to i64
%16 = sub i64 %14, %15
%17 = sdiv exact i64 %16, 4
%18 = trunc i64 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = ptrtoint i32* %2 to i64
%6 = ptrtoint i32* %1 to i64
%7 = sub i64 %5, %6
%8 = lshr exact i64 %7, 2
%9 = trunc i64 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_ext_device_manager_test() {
  printf("NOT IMPLEMENTED:"
         "pa_ext_device_manager_test"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"NOT IMPLEMENTED:pa_ext_device_manager_test\0A\00"
define i32 @pa_ext_device_manager_test() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_ext_device_manager_test\00"
define i32 @pa_ext_device_manager_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int);
void sw_one_test(void **state) {
  assert_int_equal((((0x200ul) >> 9) & ~0x8080808080808080ul), 1ul);
  assert_int_equal((((0x0102040810204080ul) >> 9) & ~0x8080808080808080ul),
                   0x0000010204081020ul);
}


x86 assembly (clang, -O0):
<sw_one_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <assert_int_equal@plt>
mov    $0x4081020,%esi
mov    %esi,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sw_one_test>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <assert_int_equal@plt>
mov    $0x4081020,%edi
mov    $0x4081020,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @sw_one_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @assert_int_equal(i32 1, i32 1)
%4 = call i32 @assert_int_equal(i32 67637280, i32 67637280)
ret void
}

LLVM IR (-O2):
define void @sw_one_test(i8** nocapture readnone %0) {
%2 = tail call i32 @assert_int_equal(i32 1, i32 1)
%3 = tail call i32 @assert_int_equal(i32 67637280, i32 67637280)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void pict2png_usage(FILE *fp) {
  fputs("usage: unrez pict2png [<options>] <file>...\n", fp);
}


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

x86 assembly (clang, -O2):
<pict2png_usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"usage: unrez pict2png [<options>] <file>...\0A\00"
define void @pict2png_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"usage: unrez pict2png [<options>] <file>...\0A\00"
define void @pict2png_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i64 44, i64 1, i32* %0)
ret void
}
int main(void) {
  signed char x;
  double y = 300;
  x = y;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movabs $0x4072c00000000000,%rax
c0 72 40
mov    %rax,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %al,-0x5(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca double
store i32 0, i32* %1
store double 3.000000e+02, double* %3
%4 = load double, double* %3
%5 = fptosi double %4 to i8
store i8 %5, i8* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int main(void) {
  int *p = 0;
  {
    int x;
    p = &x;
  }
  p;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%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
store i32 0, i32* %1
store i32* null, i32** %2
store i32* %3, i32** %2
%4 = load i32*, i32** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo04();
void bar04() { foo04(); }


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

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

LLVM IR (-O0):
define void @bar04() {
%1 = call i32 (...) @foo04()
ret void
}

LLVM IR (-O2):
define void @bar04() {
%1 = tail call i32 (...) @foo04()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int lw_put_data(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int lw_put_str(uint8_t *dst, const uint8_t *str) {
  return lw_put_data(dst, str, strlen((char *)str));
}


x86 assembly (clang, -O0):
<lw_put_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <lw_put_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw_put_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <lw_put_data@plt>

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

LLVM IR (-O2):
define i32 @lw_put_str(i32* %0, i32* %1) {
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @strlen(i8* %3)
%5 = tail call i32 @lw_put_data(i32* %0, i32* %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello world!\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
@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 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [13 x i8] c"Hello world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int listen(int, int);
__attribute__((weak)) int __real_listen(int fd, int backlog) {
  return listen(fd, backlog);
}


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

x86 assembly (clang, -O2):
<__real_listen>:
jmp    1030 <listen@plt>

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

LLVM IR (-O2):
define weak i32 @__real_listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
ret i32 %3
}
void InitMenu(void) {}


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

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

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

LLVM IR (-O2):
define void @InitMenu() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_WRONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int fd;
  fd = open("./tub", O_WRONLY);
  dup2(fd, 0);
  printf("Hola\n");
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
lea    0xe9a(%rip),%rdi
call   1060 <open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1030 <dup2@plt>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
call   1060 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
xor    %esi,%esi
call   1040 <dup2@plt>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1050 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"./tub\00"
@O_WRONLY = global i32 0
@.str.1 = [6 x i8] c"Hola\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @O_WRONLY
%8 = call i32 @open(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @dup2(i32 %9, i32 0)
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* %6
%13 = call i32 @close(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"./tub\00"
@O_WRONLY = global i32 0
@str = [5 x i8] c"Hola\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @O_WRONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @dup2(i32 %4, i32 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @close(i32 %4)
ret i32 0
}
void nand_write_cmmd(unsigned char cmmd) {
  (*(volatile unsigned char *)0x4E000008) = cmmd;
}


x86 assembly (clang, -O0):
<nand_write_cmmd>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%cl
mov    $0x4e000008,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_write_cmmd>:
mov    %dil,0x4e000008
4e
ret

LLVM IR (-O0):
define void @nand_write_cmmd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
store volatile i8 %3, i8* inttoptr (i64 1308622856 to i8*)
ret void
}

LLVM IR (-O2):
define void @nand_write_cmmd(i8 zeroext %0) {
store volatile i8 %0, i8* inttoptr (i64 1308622856 to i8*)
ret void
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_RADIO_RESET_PIN() { return 0x01 & (inp_emulate(-2) >> 2); }


x86 assembly (clang, -O0):
<TOSH_READ_RADIO_RESET_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffe,%edi
call   1030 <inp_emulate@plt>
sar    $0x2,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_RADIO_RESET_PIN>:
push   %rax
mov    $0xfffffffe,%edi
call   1030 <inp_emulate@plt>
shr    $0x2,%al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_RADIO_RESET_PIN() {
%1 = call i32 @inp_emulate(i32 -2)
%2 = ashr i32 %1, 2
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_RADIO_RESET_PIN() {
%1 = tail call i32 @inp_emulate(i32 -2)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 2
%4 = and i8 %3, 1
ret i8 %4
}
/* Variables and functions */
bool nrf52_errata_97(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_97() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t ri16(const uint8_t a[2]) {
  uint16_t x;
  x = (uint16_t)a[0] << 0;
  x |= (uint16_t)a[1] << 8;
  return x;
}


x86 assembly (clang, -O0):
<ri16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ri16>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ri16(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 0
store i32 %8, i32* %3
%9 = load i64*, i64** %2
%10 = getelementptr inbounds i64, i64* %9, i64 1
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @ri16(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
double MItoFT(double MI) { return MI * 5280; }


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

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

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

LLVM IR (-O2):
define double @MItoFT(double %0) {
%2 = fmul double %0, 5.280000e+03
ret double %2
}