xunge/DecIR huggingface dataset:
double vdot(const double *v1, const double *v2) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<vdot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdot>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @vdot(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
void INT_Excep_MTU1_TCIU1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU1_TCIU1() {
ret void
}
/* Variables and functions */
scalar_t__ Q_isalpha(int);
scalar_t__ Q_isnumeric(int);
int Q_isalphanumeric(int c) {
  if (Q_isalpha(c) || Q_isnumeric(c)) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<Q_isalphanumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <Q_isalpha@plt>
cmp    $0x0,%rax
jne    114f <Q_isalphanumeric+0x2f>
mov    -0x8(%rbp),%edi
call   1030 <Q_isnumeric@plt>
cmp    $0x0,%rax
je     115b <Q_isalphanumeric+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <Q_isalphanumeric+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_isalphanumeric>:
push   %rbx
mov    %edi,%ebx
call   1040 <Q_isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <Q_isalphanumeric+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <Q_isnumeric@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @Q_isalphanumeric(i32 %0) {
%2 = tail call i64 @Q_isalpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @Q_isnumeric(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int f_eq_rr1(float a1, float a2) { return (((a1) == (a2))); }


x86 assembly (clang, -O0):
<f_eq_rr1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_eq_rr1>:
cmpeqss %xmm1,%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @f_eq_rr1(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oeq float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @f_eq_rr1(float %0, float %1) {
%3 = fcmp oeq float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void f() { puts("f()"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"f()\00"
define void @f() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double log10(double);
double rt_log2(double x) { return 3.32192809488736234787 * log10(x); }


x86 assembly (clang, -O0):
<rt_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log10@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_log2>:
push   %rax
call   1030 <log10@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rt_log2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log10(double %3)
%5 = fmul double 0x400A934F0979A371, %4
ret double %5
}

LLVM IR (-O2):
define double @rt_log2(double %0) {
%2 = tail call double @log10(double %0)
%3 = fmul double %2, 0x400A934F0979A371
ret double %3
}
/* Variables and functions */
int uart_read(char *, int);
int _read(int file, char *p, int len) { return uart_read(p, len); }


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <uart_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read>:
mov    %rsi,%rdi
mov    %edx,%esi
jmp    1030 <uart_read@plt>

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

LLVM IR (-O2):
define i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @uart_read(i8* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
scalar_t__ SoftTimerDings(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ SoftTimerGetMS();
void SoftTimerDelay(uint16_t msec) {
  uint32_t pastTime;
  pastTime = SoftTimerGetMS();
  while (1) {
    if (SoftTimerDings(pastTime, msec)) {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<SoftTimerDelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <SoftTimerGetMS@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <SoftTimerDings@plt>
cmp    $0x0,%rax
je     114f <SoftTimerDelay+0x2f>
jmp    1154 <SoftTimerDelay+0x34>
jmp    1135 <SoftTimerDelay+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SoftTimerDelay>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <SoftTimerGetMS@plt>
mov    %eax,%ebp
xchg   %ax,%ax
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <SoftTimerDings@plt>
test   %rax,%rax
je     1130 <SoftTimerDelay+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @SoftTimerDelay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @SoftTimerGetMS()
store i32 %4, i32* %3
br label %5
5: ; preds = %1, %11
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = call i64 @SoftTimerDings(i32 %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %5
br label %12
11: ; preds = %5
br label %5
12: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @SoftTimerDelay(i32 %0) {
%2 = tail call i32 (...) @SoftTimerGetMS()
br label %3
3: ; preds = %3, %1
%4 = tail call i64 @SoftTimerDings(i32 %2, i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %3, label %6
6: ; preds = %3
ret void
}
/* Variables and functions */
int checker_read_long_long(int, char const *, int, long long *);
int checker_read_corr_long_long(const char *name, int eof_error_flag,
                                long long *p_val) {
  return checker_read_long_long(2, name, eof_error_flag, p_val);
}


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

x86 assembly (clang, -O2):
<checker_read_corr_long_long>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x2,%edi
jmp    1030 <checker_read_long_long@plt>

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

LLVM IR (-O2):
define i32 @checker_read_corr_long_long(i8* %0, i32 %1, i64* %2) {
%4 = tail call i32 @checker_read_long_long(i32 2, i8* %0, i32 %1, i64* %2)
ret i32 %4
}
int fun1158() { return 1158; }


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

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

LLVM IR (-O0):
define i32 @fun1158() {
ret i32 1158
}

LLVM IR (-O2):
define i32 @fun1158() {
ret i32 1158
}
/* Variables and functions */
int /*<<< orphan*/ foo(double, double, double);
int main() {
  foo(1.0, 2.0, 3.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  0xed9(%rip),%xmm1
movsd  0xed9(%rip),%xmm2
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
movsd  0xee7(%rip),%xmm2
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ burn(int /*<<< orphan*/ *, int);
void burnstack(int kb) {
  uint8_t stack[1024];
  burn(stack, 1024);
  if (kb > 0)
    burnstack(kb - 1024);
}


x86 assembly (clang, -O0):
<burnstack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x1010(%rbp),%rdi
mov    $0x400,%esi
call   1030 <burn@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1157 <burnstack+0x37>
mov    -0x4(%rbp),%edi
sub    $0x400,%edi
call   1040 <burnstack@plt>
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<burnstack>:
push   %rbx
sub    $0x1000,%rsp
mov    %edi,%ebx
mov    %rsp,%rdi
mov    $0x400,%esi
call   1030 <burn@plt>
test   %ebx,%ebx
jle    1148 <burnstack+0x28>
add    $0xfffffc00,%ebx
mov    %ebx,%edi
call   1040 <burnstack@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @burnstack(i32 %0) {
%2 = alloca i32
%3 = alloca [1024 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [1024 x i32], [1024 x i32]* %3, i64 0, i64 0
%5 = call i32 @burn(i32* %4, i32 1024)
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 1024
br label %11
11: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @burnstack(i32 %0) {
%2 = alloca [1024 x i32]
%3 = bitcast [1024 x i32]* %2 to i8*
%4 = getelementptr inbounds [1024 x i32], [1024 x i32]* %2, i64 0, i64 0
%5 = call i32 @burn(i32* %4, i32 1024)
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = add nsw i32 %0, -1024
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
void strncmp_diff_length_4() {
  char *x = "123";
  char *y = "12345";
  if (strncmp(x, y, 3) != 0)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strncmp_diff_length_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     114a <strncmp_diff_length_4+0x3a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_diff_length_4>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x3,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strncmp_diff_length_4() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncmp(i8* %3, i8* %4, i32 3)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i8, i8* null
br label %9
9: ; preds = %7, %0
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"12345\00"
define void @strncmp_diff_length_4() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ floydWarshall(int **);
int main() {
  int graph[4][4] = {{0, 5, 99999, 10},
                     {99999, 0, 3, 99999},
                     {99999, 99999, 0, 1},
                     {99999, 99999, 99999, 0}};
  floydWarshall(graph);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1040 <floydWarshall@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <floydWarshall@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.graph = [4 x [4 x i32]] [[4 x i32] [i32 0, i32 5, i32 99999, i32 10], [4 x i32] [i32 99999, i32 0, i32 3, i32 99999], [4 x i32] [i32 99999, i32 99999, i32 0, i32 1], [4 x i32] [i32 99999, i32 99999, i32 99999, i32 0]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [4 x i32]]
store i32 0, i32* %1
%3 = bitcast [4 x [4 x i32]]* %2 to i8*
%4 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %2, i64 0, i64 0
%5 = bitcast [4 x i32]* %4 to i32**
%6 = call i32 @floydWarshall(i32** %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.graph = [4 x [4 x i32]] [[4 x i32] [i32 0, i32 5, i32 99999, i32 10], [4 x i32] [i32 99999, i32 0, i32 3, i32 99999], [4 x i32] [i32 99999, i32 99999, i32 0, i32 1], [4 x i32] [i32 99999, i32 99999, i32 99999, i32 0]]
define i32 @main() {
%1 = alloca [4 x [4 x i32]]
%2 = bitcast [4 x [4 x i32]]* %1 to i8*
%3 = bitcast [4 x [4 x i32]]* %1 to i32**
%4 = call i32 @floydWarshall(i32** %3)
ret i32 0
}
int sha384_test(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @sha384_test() {
ret i32 2
}

LLVM IR (-O2):
define i32 @sha384_test() {
ret i32 2
}
void RTSha512ToString(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSha512ToString() {
ret void
}
/* Variables and functions */
bool nrf52_errata_54(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_54() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void xload_error(const char *str1, const char *str2) {
  (void)fprintf(stderr, "xload: %s %s\n", str1, str2);
  exit(-1);
}


x86 assembly (clang, -O0):
<xload_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<xload_error>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"xload: %s %s\0A\00"
define void @xload_error(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"xload: %s %s\0A\00"
define void @xload_error(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
void write_word(unsigned char *p, unsigned short v) {
  p[0] = v & 0xff;
  p[1] = (v >> 8) & 0xff;
}


x86 assembly (clang, -O0):
<write_word>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_word>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @write_word(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
ret void
}

LLVM IR (-O2):
define void @write_word(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
store i8 %3, i8* %0
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
int maximum(int a, int b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<maximum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <maximum+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <maximum+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximum>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @maximum(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void swap(char *a, char *b) {
  char _t = *a;
  *a = *b;
  *b = _t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
int main() {
  int i;
  int res = 12;
  goto L1;
  while (i < 100) {
    if (i > 100) {
    L1:
      res = 0;
      goto L2;
      break;
    }
    i++;
  }
L2:
  return res;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int isspace(int);
int whitespace(char c) { return (isspace((int)c)); }


x86 assembly (clang, -O0):
<whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isspace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whitespace>:
jmp    1030 <isspace@plt>

LLVM IR (-O0):
define i32 @whitespace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = call i32 @isspace(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @whitespace(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 @isspace(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t set_xlow_0_trail_1s(uint64_t u) { return (u + 1) ^ ~u; }


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

x86 assembly (clang, -O2):
<set_xlow_0_trail_1s>:
mov    $0xfffffffe,%eax
sub    %edi,%eax
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @set_xlow_0_trail_1s(i32 %0) {
%2 = sub i32 -2, %0
%3 = xor i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_layer_get_categories_names(char ***, int *);
const char *roadmap_layer_cfcc2type(int cfcc) {
  char **categories;
  int count;
  roadmap_layer_get_categories_names(&categories, &count);
  return categories[cfcc - 1];
}


x86 assembly (clang, -O0):
<roadmap_layer_cfcc2type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <roadmap_layer_get_categories_names@plt>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_layer_cfcc2type>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %rsp,%rdi
lea    0xc(%rsp),%rsi
call   1030 <roadmap_layer_get_categories_names@plt>
mov    (%rsp),%rax
movslq %ebx,%rcx
mov    -0x8(%rax,%rcx,8),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @roadmap_layer_cfcc2type(i32 %0) {
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 @roadmap_layer_get_categories_names(i8*** %3, i32* %4)
%6 = load i8**, i8*** %3
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8*, i8** %6, i64 %9
%11 = load i8*, i8** %10
ret i8* %11
}

LLVM IR (-O2):
define i8* @roadmap_layer_cfcc2type(i32 %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = bitcast i8*** %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @roadmap_layer_get_categories_names(i8*** %2, i32* %3)
%7 = load i8**, i8*** %2
%8 = add nsw i32 %0, -1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8*, i8** %7, i64 %9
%11 = load i8*, i8** %10
ret i8* %11
}
int f() {
  __label__ lbl1;
  __label__ lbl2;
lbl1:;
lbl2:;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f+0x9>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
br label %2
2: ; preds = %0
br label %3
3: ; preds = %2
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ u_int64_t;

/* Variables and functions */
double calc_rate(u_int64_t new_bytes, u_int64_t last_bytes, double interval) {
  double rate;
  rate = (double)(new_bytes - last_bytes) * 8 / interval;
  return (rate);
}


x86 assembly (clang, -O0):
<calc_rate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_rate>:
sub    %rsi,%rdi
cvtsi2sd %rdi,%xmm1
mulsd  0xef0(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @calc_rate(i64 %0, i64 %1, double %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca double
%7 = alloca double
store i64 %0, i64* %4
store i64 %1, i64* %5
store double %2, double* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = sub nsw i64 %8, %9
%11 = sitofp i64 %10 to double
%12 = fmul double %11, 8.000000e+00
%13 = load double, double* %6
%14 = fdiv double %12, %13
store double %14, double* %7
%15 = load double, double* %7
ret double %15
}

LLVM IR (-O2):
define double @calc_rate(i64 %0, i64 %1, double %2) {
%4 = sub nsw i64 %0, %1
%5 = sitofp i64 %4 to double
%6 = fmul double %5, 8.000000e+00
%7 = fdiv double %6, %2
ret double %7
}
void sys_exit(int status) {
  asm volatile("int %0\n" : : "i"(51), "a"(status) : "cc", "memory");
loop:
  goto loop;
}


x86 assembly (clang, -O0):
<sys_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
int    $0x33
jmp    110c <sys_exit+0xc>

x86 assembly (clang, -O2):
<sys_exit>:
mov    %edi,%eax
int    $0x33
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1110 <sys_exit+0x10>

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

LLVM IR (-O2):
define void @sys_exit(i32 %0) {
tail call void asm sideeffect "int $0\0A", "i,{ax},~{cc},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 51, i32 %0)
br label %2
2: ; preds = %2, %1
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int, int /*<<< orphan*/ const);
void zeroize(uint8_t *in, const uint64_t num_bytes) {
  memset(in, 0x00, num_bytes);
}


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

x86 assembly (clang, -O2):
<zeroize>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @zeroize(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 @memset(i32* %5, i32 0, i32 %6)
ret void
}

LLVM IR (-O2):
define void @zeroize(i32* %0, i32 %1) {
%3 = tail call i32 @memset(i32* %0, i32 0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvtps_pi32(int /*<<< orphan*/);
int /*<<< orphan*/ _mm_movehl_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_packs_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((__always___, __nodebug__)) _mm_cvtps_pi16(__m128 a) {
  __m64 b, c;
  b = _mm_cvtps_pi32(a);
  a = _mm_movehl_ps(a, a);
  c = _mm_cvtps_pi32(a);
  return _mm_packs_pi16(b, c);
}


x86 assembly (clang, -O0):
<_mm_cvtps_pi16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_mm_cvtps_pi32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <_mm_movehl_ps@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_mm_cvtps_pi32@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <_mm_packs_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_cvtps_pi16>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <_mm_cvtps_pi32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <_mm_movehl_ps@plt>
mov    %eax,%edi
call   1040 <_mm_cvtps_pi32@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_mm_packs_pi16@plt>

LLVM IR (-O0):
define i32 @_mm_cvtps_pi16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @_mm_cvtps_pi32(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @_mm_movehl_ps(i32 %7, i32 %8)
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @_mm_cvtps_pi32(i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @_mm_packs_pi16(i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @_mm_cvtps_pi16(i32 %0) {
%2 = tail call i32 @_mm_cvtps_pi32(i32 %0)
%3 = tail call i32 @_mm_movehl_ps(i32 %0, i32 %0)
%4 = tail call i32 @_mm_cvtps_pi32(i32 %3)
%5 = tail call i32 @_mm_packs_pi16(i32 %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print(int *);
void main() {
  int vetor[6] = {6, 4, 5, 0, 8, 9};
  print(vetor);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <print@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.vetor = [6 x i32] [i32 6, i32 4, i32 5, i32 0, i32 8, i32 9]
define void @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @print(i32* %3)
ret void
}

LLVM IR (-O2):
@__const.main.vetor = [6 x i32] [i32 6, i32 4, i32 5, i32 0, i32 8, i32 9]
define void @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @print(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_usage() {
  printf("\nTo display the help menu and obtain a list of features, type \"h\" "
         "or \"help\"\n");
  printf("To quickly start a new game, type \"n\" or \"new\"\n\n");
}


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

x86 assembly (clang, -O2):
<display_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [77 x i8] c"\0ATo display the help menu and obtain a list of features, type \22h\22 or \22help\22\0A\00"
@.str.1 = [49 x i8] c"To quickly start a new game, type \22n\22 or \22new\22\0A\0A\00"
define void @display_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [76 x i8] c"\0ATo display the help menu and obtain a list of features, type \22h\22 or \22help\22\00"
@str.2 = [48 x i8] c"To quickly start a new game, type \22n\22 or \22new\22\0A\00"
define void @display_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.2, i64 0, i64 0))
ret void
}
int arch_prepare_suspend(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @arch_prepare_suspend() {
ret i32 0
}
int t(int a) { return ((((a) > (1)) ? (a) : (1))); }


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    111c <t+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <t+0x29>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <t+0x29>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
test   %edi,%edi
mov    $0x1,%eax
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @t(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = select i1 %2, i32 %0, i32 1
ret i32 %3
}
void hostmonitor_execute_initialization() {}


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

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

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

LLVM IR (-O2):
define void @hostmonitor_execute_initialization() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strStr(char *, char *);
int main() {
  char *h = "ABCDEFGHIJAB";
  char *n = "EFG";
  printf("%d\n", strStr(h, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strStr@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xede(%rip),%rsi
call   1040 <strStr@plt>
lea    0xed6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"ABCDEFGHIJAB\00"
@.str.1 = [4 x i8] c"EFG\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @strStr(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
void tlib_on_translation_cache_size_change(int32_t new_size) {}


x86 assembly (clang, -O0):
<tlib_on_translation_cache_size_change>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @tlib_on_translation_cache_size_change(i32 %0) {
ret void
}
/* Type definitions */
typedef char wchar_t;

/* Variables and functions */
int main() {
  char a[10] = "abc";
  char b[10] = "\u1120\u0220\U00102030";
  const wchar_t *foo = L"AB";
  const wchar_t *bar = L"\u1234\U0010F00B";
  const wchar_t *baz = L"\u1234"
                       "\U0010F00C";
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xef2(%rip),%ax
mov    %ax,-0x2(%rbp)
mov    0xee9(%rip),%rax
mov    %rax,-0x14(%rbp)
mov    0xee6(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xede(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xedf(%rip),%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [10 x i8] c"abc\00\00\00\00\00\00\00"
@__const.main.b = [10 x i8] c"\E1\84\A0\C8\A0\F4\82\80\B0\00"
@.str = [3 x i32] [i32 65, i32 66, i32 0]
@.str.1 = [3 x i32] [i32 4660, i32 1110027, i32 0]
@.str.2 = [3 x i32] [i32 4660, i32 1110028, i32 0]
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = bitcast [10 x i8]* %1 to i8*
%7 = bitcast [10 x i8]* %2 to i8*
store i8* bitcast ([3 x i32]* @.str to i8*), i8** %3
store i8* bitcast ([3 x i32]* @.str.1 to i8*), i8** %4
store i8* bitcast ([3 x i32]* @.str.2 to i8*), i8** %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double M_PI;
int cos(double);
double sineEaseInOutd(double p) { return 0.5 * (1 - cos(p * M_PI)); }


x86 assembly (clang, -O0):
<sineEaseInOutd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ebf(%rip),%rax
mulsd  (%rax),%xmm0
call   1030 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sineEaseInOutd>:
push   %rax
mov    0x2ed0(%rip),%rax
mulsd  (%rax),%xmm0
call   1030 <cos@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0xec9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @sineEaseInOutd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @M_PI
%5 = fmul double %3, %4
%6 = call i32 @cos(double %5)
%7 = sub nsw i32 1, %6
%8 = sitofp i32 %7 to double
%9 = fmul double 5.000000e-01, %8
ret double %9
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @sineEaseInOutd(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = tail call i32 @cos(double %3)
%5 = sub nsw i32 1, %4
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 5.000000e-01
ret double %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ transmit(int, int, int /*<<< orphan*/);
void send_1(uint32_t pulse_len) {
  transmit(3, 1, pulse_len);
  transmit(3, 1, pulse_len);
}


x86 assembly (clang, -O0):
<send_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x3,%edi
mov    $0x1,%esi
call   1030 <transmit@plt>
mov    -0x4(%rbp),%edx
mov    $0x3,%edi
mov    $0x1,%esi
call   1030 <transmit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_1>:
push   %rbx
mov    %edi,%ebx
mov    $0x3,%edi
mov    $0x1,%esi
mov    %ebx,%edx
call   1030 <transmit@plt>
mov    $0x3,%edi
mov    $0x1,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <transmit@plt>

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

LLVM IR (-O2):
define void @send_1(i32 %0) {
%2 = tail call i32 @transmit(i32 3, i32 1, i32 %0)
%3 = tail call i32 @transmit(i32 3, i32 1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int close_serial_interface(int filedesc) {
  close(filedesc);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @close_serial_interface(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 0
}
int isleap(int year) {
  return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
}


x86 assembly (clang, -O0):
<isleap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1153 <isleap+0x53>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x6(%rbp)
jne    114d <isleap+0x4d>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isleap>:
xor    %eax,%eax
test   $0x3,%dil
je     1109 <isleap+0x9>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
mov    $0x1,%eax
cmp    $0x28f5c28,%edx
ja     1108 <isleap+0x8>
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @isleap(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 4
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 100
%9 = icmp ne i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = srem i32 %11, 400
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %10, %6
%15 = phi i1 [ true, %6 ], [ %13, %10 ]
br label %16
16: ; preds = %14, %1
%17 = phi i1 [ false, %1 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @isleap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %7, %1
%12 = phi i32 [ 0, %1 ], [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ serial_write(int /*<<< orphan*/ *, int);
void output_ypr_binary(double in_YawPitchRoll_deg[3]) {
  serial_write((uint8_t *)in_YawPitchRoll_deg, 3 * sizeof(double));
}


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

x86 assembly (clang, -O2):
<output_ypr_binary>:
mov    $0x18,%esi
jmp    1030 <serial_write@plt>

LLVM IR (-O0):
define void @output_ypr_binary(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = bitcast double* %3 to i32*
%5 = call i32 @serial_write(i32* %4, i32 24)
ret void
}

LLVM IR (-O2):
define void @output_ypr_binary(double* %0) {
%2 = bitcast double* %0 to i32*
%3 = tail call i32 @serial_write(i32* %2, i32 24)
ret void
}
__attribute__((patchable_function_entry(2))) void f2() {}


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

x86 assembly (clang, -O2):
<f2>:
xchg   %ax,%ax
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
extern time_t time_(void) { return (time(NULL)); }


x86 assembly (clang, -O0):
<time_>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @time_() {
%1 = call i32 @time(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @time_() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}