xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_GREEN_LED_INPUT() { clear_io_bit(0x36, 1); }


x86 assembly (clang, -O0):
<TOSH_MAKE_GREEN_LED_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x36,%edi
mov    $0x1,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_GREEN_LED_INPUT>:
mov    $0x36,%edi
mov    $0x1,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_GREEN_LED_INPUT() {
%1 = call i32 @clear_io_bit(i32 54, i32 1)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_GREEN_LED_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 54, i32 1)
ret void
}
long func_test(long from) {
  long i, j;
  for (i = 1L; j; ++i) {
    for (j = from; j > 0L; --j)
      if (i % j)
        break;
  }
  return --i;
}


x86 assembly (clang, -O0):
<func_test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1173 <func_test+0x73>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jle    115d <func_test+0x5d>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
je     1147 <func_test+0x47>
jmp    115d <func_test+0x5d>
jmp    114c <func_test+0x4c>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1123 <func_test+0x23>
jmp    1162 <func_test+0x62>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <func_test+0x10>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_test>:
mov    $0x1,%eax
jmp    1119 <func_test+0x19>
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
test   %rsi,%rsi
je     1168 <func_test+0x68>
mov    %rax,%rcx
mov    %rdi,%rsi
test   %rdi,%rdi
jle    1110 <func_test+0x10>
mov    %rdi,%rsi
nopw   0x0(%rax,%rax,1)
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1150 <func_test+0x50>
mov    %rcx,%rax
cqto
idiv   %rsi
test   %rdx,%rdx
je     115b <func_test+0x5b>
jmp    1110 <func_test+0x10>
nopl   0x0(%rax,%rax,1)
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
jne    1110 <func_test+0x10>
lea    -0x1(%rsi),%rax
cmp    $0x1,%rsi
mov    %rax,%rsi
jg     1130 <func_test+0x30>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @func_test(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 1, i64* %3
br label %5
5: ; preds = %24, %1
%6 = load i64, i64* %4
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %5
%9 = load i64, i64* %2
store i64 %9, i64* %4
br label %10
10: ; preds = %20, %8
%11 = load i64, i64* %4
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = srem i64 %14, %15
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %13
br label %23
19: ; preds = %13
br label %20
20: ; preds = %19
%21 = load i64, i64* %4
%22 = add nsw i64 %21, -1
store i64 %22, i64* %4
br label %10
23: ; preds = %18, %10
br label %24
24: ; preds = %23
%25 = load i64, i64* %3
%26 = add nsw i64 %25, 1
store i64 %26, i64* %3
br label %5
27: ; preds = %5
%28 = load i64, i64* %3
%29 = add nsw i64 %28, -1
store i64 %29, i64* %3
ret i64 %29
}

LLVM IR (-O2):
define i64 @func_test(i64 %0) {
%2 = icmp sgt i64 %0, 0
br label %3
3: ; preds = %1, %12
%4 = phi i64 [ 1, %1 ], [ %14, %12 ]
br i1 %2, label %5, label %12
5: ; preds = %3, %9
%6 = phi i64 [ %10, %9 ], [ %0, %3 ]
%7 = srem i64 %4, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = add nsw i64 %6, -1
%11 = icmp sgt i64 %6, 1
br i1 %11, label %5, label %16
12: ; preds = %5, %3
%13 = phi i64 [ %0, %3 ], [ %6, %5 ]
%14 = add nuw nsw i64 %4, 1
%15 = icmp eq i64 %13, 0
br i1 %15, label %16, label %3
16: ; preds = %12, %9
ret i64 %4
}
void foo488(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo488(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 1;
  while (i <= 100) {
    if (i % 2 == 0)
      printf("%d\n", i);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1161 <main+0x51>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1153 <main+0x43>
mov    -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x65,%ebx
je     1149 <main+0x39>
test   $0x1,%bl
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 100
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 1, %0 ], [ %8, %7 ]
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %5, %1
%8 = add nuw nsw i32 %2, 1
%9 = icmp eq i32 %8, 101
br i1 %9, label %10, label %1
10: ; preds = %7
ret i32 0
}
int strcmp(const char *s1, const char *s2) {
  char c;
  while (1) {
    if ((c = *s1 - *s2++) != 0 || !*s1++)
      break;
  }
  return c;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
jne    114e <strcmp+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
jne    1153 <strcmp+0x53>
jmp    1158 <strcmp+0x58>
jmp    110c <strcmp+0xc>
movsbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%edx
mov    %edx,%ecx
sub    (%rsi,%rax,1),%cl
test   %dl,%dl
je     1125 <strcmp+0x25>
add    $0x1,%rax
test   %cl,%cl
je     1110 <strcmp+0x10>
movsbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %10, %3 ]
%5 = phi i8* [ %0, %2 ], [ %11, %3 ]
%6 = load i8, i8* %5
%7 = load i8, i8* %4
%8 = sub i8 %6, %7
%9 = icmp ne i8 %8, 0
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %6, 0
%13 = or i1 %12, %9
br i1 %13, label %14, label %3
14: ; preds = %3
%15 = sext i8 %8 to i32
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int, int);
void write_tes_channelname(char *s, int row, int col) {
  snprintf(s, 14, "tesdatar%2.2dc%2.2d", row, col);
}


x86 assembly (clang, -O0):
<write_tes_channelname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    $0xe,%esi
lea    0xec7(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_tes_channelname>:
mov    %edx,%r8d
mov    %esi,%ecx
lea    0xee4(%rip),%rdx
mov    $0xe,%esi
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"tesdatar%2.2dc%2.2d\00"
define void @write_tes_channelname(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @snprintf(i8* %7, i32 14, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"tesdatar%2.2dc%2.2d\00"
define void @write_tes_channelname(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %0, i32 14, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void test_errflush(int child_p, char *errbuf, size_t num, void *apparg) {
  fputs(errbuf, stderr);
}


x86 assembly (clang, -O0):
<test_errflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_errflush>:
mov    %rsi,%rdi
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @test_errflush(i32 %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i32, i32* @stderr
%11 = call i32 @fputs(i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @test_errflush(i32 %0, i8* %1, i64 %2, i8* nocapture readnone %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* %1, i32 %5)
ret void
}
/* Variables and functions */
double *malloc(int);
double *c_copy(double *inArr, int arrLen) {
  double *outArr = malloc(arrLen * sizeof(double));
  for (int i = 0; i < arrLen; i++) {
    outArr[i] = inArr[i];
  }
  return outArr;
}


x86 assembly (clang, -O0):
<c_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116d <c_copy+0x5d>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1139 <c_copy+0x29>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_copy>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
lea    0x0(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%r15
test   %ebx,%ebx
jle    114e <c_copy+0x2e>
mov    %ebx,%edx
shl    $0x3,%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias double* @c_copy(double* nocapture %0, i32 %1) {
%3 = shl i32 %1, 3
%4 = tail call double* @malloc(i32 %3)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = bitcast double* %4 to i8*
%8 = bitcast double* %0 to i8*
%9 = zext i32 %1 to i64
%10 = shl nuw nsw i64 %9, 3
br label %11
11: ; preds = %6, %2
ret double* %4
}
int mbo_load_net(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @mbo_load_net() {
ret i32 1
}

LLVM IR (-O2):
define i32 @mbo_load_net() {
ret i32 1
}
double f(double x) {
  double return_val;
  return_val = x * x + 1;
  return return_val;
}


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

x86 assembly (clang, -O2):
<f>:
mulsd  %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ gzFile;

/* Variables and functions */
int gzgetc(int /*<<< orphan*/);
size_t gzskipline(gzFile file) {
  int c;
  size_t skipped_bytes = 0;
  while ((c = gzgetc(file)) != -1) {
    skipped_bytes++;
    if (c == '\n')
      break;
  }
  return skipped_bytes;
}


x86 assembly (clang, -O0):
<gzskipline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <gzgetc@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
je     1157 <gzskipline+0x47>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    1152 <gzskipline+0x42>
jmp    1157 <gzskipline+0x47>
jmp    1123 <gzskipline+0x13>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gzskipline>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <gzgetc@plt>
cmp    $0xffffffff,%eax
je     1135 <gzskipline+0x25>
add    $0x1,%rbx
cmp    $0xa,%eax
jne    1120 <gzskipline+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i64 @gzskipline(i32 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ 0, %1 ], [ %7, %6 ]
%4 = tail call i32 @gzgetc(i32 %0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = add i64 %3, 1
%8 = icmp eq i32 %4, 10
br i1 %8, label %9, label %2
9: ; preds = %6, %2
%10 = phi i64 [ %7, %6 ], [ %3, %2 ]
ret i64 %10
}
void uart_tx_int_enable(void) {
  (*((volatile unsigned long *)0x7F005038)) &= ~(1 << 2);
}


x86 assembly (clang, -O0):
<uart_tx_int_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f005038,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffb,%rcx
mov    $0x7f005038,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_tx_int_enable>:
andq   $0xfffffffffffffffb,0x7f005038
7f fb
ret

LLVM IR (-O0):
define void @uart_tx_int_enable() {
%1 = load volatile i64, i64* inttoptr (i64 2130726968 to i64*)
%2 = and i64 %1, -5
store volatile i64 %2, i64* inttoptr (i64 2130726968 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart_tx_int_enable() {
%1 = load volatile i64, i64* inttoptr (i64 2130726968 to i64*)
%2 = and i64 %1, -5
store volatile i64 %2, i64* inttoptr (i64 2130726968 to i64*)
ret void
}
/* Variables and functions */
char EOF;
char getc(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdin;
int main() {
  char c;
  while ((c = getc(stdin)) != EOF)
    if (c >= 32 && c <= 126)
      putchar(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1040 <getc@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2e96(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     117d <main+0x5d>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jl     1178 <main+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x7e,%eax
jg     1178 <main+0x58>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
mov    (%r14),%edi
call   1040 <getc@plt>
mov    0x2ea6(%rip),%rbx
jmp    1148 <main+0x28>
nopl   0x0(%rax)
mov    (%r14),%edi
call   1040 <getc@plt>
cmp    (%rbx),%al
je     115e <main+0x3e>
lea    -0x20(%rax),%ecx
cmp    $0x5e,%cl
ja     1140 <main+0x20>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@EOF = global i8 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %21, %0
%4 = load i32, i32* @stdin
%5 = call signext i8 @getc(i32 %4)
store i8 %5, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* @EOF
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %6, %8
br i1 %9, label %10, label %22
10: ; preds = %3
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 32
br i1 %13, label %14, label %21
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 126
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i8, i8* %2
%20 = call i32 @putchar(i8 signext %19)
br label %21
21: ; preds = %18, %14, %10
br label %3
22: ; preds = %3
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@stdin = global i32 0
@EOF = global i8 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call signext i8 @getc(i32 %1)
%3 = load i8, i8* @EOF
%4 = icmp eq i8 %2, %3
br i1 %4, label %16, label %5
5: ; preds = %0, %11
%6 = phi i8 [ %13, %11 ], [ %2, %0 ]
%7 = add i8 %6, -32
%8 = icmp ult i8 %7, 95
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i32 @putchar(i8 signext %6)
br label %11
11: ; preds = %9, %5
%12 = load i32, i32* @stdin
%13 = tail call signext i8 @getc(i32 %12)
%14 = load i8, i8* @EOF
%15 = icmp eq i8 %13, %14
br i1 %15, label %16, label %5
16: ; preds = %11, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ receiver_test();
int /*<<< orphan*/ sender_test();
int main(int argc, char *argv[]) {
  if (argc > 1) {
    receiver_test();
  } else {
    sender_test();
  }
  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)
cmpl   $0x1,-0x8(%rbp)
jle    114c <main+0x2c>
mov    $0x0,%al
call   1030 <receiver_test@plt>
jmp    1153 <main+0x33>
mov    $0x0,%al
call   1040 <sender_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
cmp    $0x2,%edi
jl     112f <main+0xf>
call   1030 <receiver_test@plt>
jmp    1134 <main+0x14>
call   1040 <sender_test@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 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @receiver_test()
br label %12
10: ; preds = %2
%11 = call i32 (...) @sender_test()
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @receiver_test()
br label %8
6: ; preds = %2
%7 = tail call i32 (...) @sender_test()
br label %8
8: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int pot(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int base, exp;
  printf("Informe a base e o expoente: ");
  scanf("%d %d", &base, &exp);
  printf("O resultado é %d\n", pot(base, exp));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <pot@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <pot@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Informe a base e o expoente: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [19 x i8] c"O resultado \C3\A9 %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @pot(i32 %6, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Informe a base e o expoente: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [19 x i8] c"O resultado \C3\A9 %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @pot(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
char const *GetPchar323();
const char *getpchar() { return GetPchar323(); }


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

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

LLVM IR (-O0):
define i8* @getpchar() {
%1 = call i8* (...) @GetPchar323()
ret i8* %1
}

LLVM IR (-O2):
define i8* @getpchar() {
%1 = tail call i8* (...) @GetPchar323()
ret i8* %1
}
int func6() {
#pragma critTer : 22 :../../ test / resources / functionNumber.c:
  return 0;
#pragma critTer : 23 :../../ test / resources / functionNumber.c:
}


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

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

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

LLVM IR (-O2):
define i32 @func6() {
ret i32 0
}
void M420ToI420() {}


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

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

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

LLVM IR (-O2):
define void @M420ToI420() {
ret void
}
long f(void) { return 1; }


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

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

LLVM IR (-O0):
define i64 @f() {
ret i64 1
}

LLVM IR (-O2):
define i64 @f() {
ret i64 1
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgtext(void) { gen(".code"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c".code\00"
define void @cgtext() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
long _syscall5(long cnum, long a1, long a2, long a3, long a4, long a5) {
  register long ret __asm__("rax");
  register long r0 __asm__("rax") = cnum;
  register long r1 __asm__("rdi") = a1;
  register long r2 __asm__("rsi") = a2;
  register long r3 __asm__("rdx") = a3;
  register long r4 __asm__("r10") = a4;
  register long r5 __asm__("r8") = a5;
  __asm__ __volatile__("syscall"
                       : "=r"(ret)
                       : "r"(r0), "r"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5)
                       : "rcx", "r11", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<_syscall5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x60(%rbp),%r10
mov    -0x68(%rbp),%r8
syscall
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall5>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%r10
mov    %r9,%r8
syscall
ret

LLVM IR (-O0):
define i64 @_syscall5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%20 = load i64, i64* %7
store i64 %20, i64* %14
%21 = load i64, i64* %8
store i64 %21, i64* %15
%22 = load i64, i64* %9
store i64 %22, i64* %16
%23 = load i64, i64* %10
store i64 %23, i64* %17
%24 = load i64, i64* %11
store i64 %24, i64* %18
%25 = load i64, i64* %12
store i64 %25, i64* %19
%26 = load i64, i64* %14
%27 = load i64, i64* %15
%28 = load i64, i64* %16
%29 = load i64, i64* %17
%30 = load i64, i64* %18
%31 = load i64, i64* %19
%32 = call i64 asm sideeffect "syscall", "={rax},{rax},{rdi},{rsi},{rdx},{r10},{r8},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %26, i64 %27, i64 %28, i64 %29, i64 %30, i64 %31)
store i64 %32, i64* %13
%33 = load i64, i64* %13
ret i64 %33
}

LLVM IR (-O2):
define i64 @_syscall5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = tail call i64 asm sideeffect "syscall", "={rax},{rax},{rdi},{rsi},{rdx},{r10},{r8},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5)
ret i64 %7
}
void dsp_echo_flush(__attribute__((unused)) struct DSPObject *dsp) {}


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

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

LLVM IR (-O0):
%struct.DSPObject = type opaque
define void @dsp_echo_flush(%struct.DSPObject* %0) {
%2 = alloca %struct.DSPObject*
store %struct.DSPObject* %0, %struct.DSPObject** %2
ret void
}

LLVM IR (-O2):
%struct.DSPObject = type opaque
define void @dsp_echo_flush(%struct.DSPObject* nocapture %0) {
ret void
}
/* Variables and functions */
int strlen(char *);
char *getpage(char *filename) {
  char *p;
  p = filename + strlen(filename);
  while (*--p != '/')
    ;
  return p + 1;
}


x86 assembly (clang, -O0):
<getpage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl -0x1(%rax),%eax
cmp    $0x2f,%eax
je     115e <getpage+0x4e>
jmp    113d <getpage+0x2d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpage>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
add    $0x1,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x2f,-0x2(%rax)
lea    -0x1(%rax),%rax
jne    1130 <getpage+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define i8* @getpage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
store i8* %8, i8** %3
br label %9
9: ; preds = %15, %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 -1
store i8* %11, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 47
br i1 %14, label %15, label %16
15: ; preds = %9
br label %9
16: ; preds = %9
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 1
ret i8* %18
}

LLVM IR (-O2):
define i8* @getpage(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %5, %1
%6 = phi i8* [ %4, %1 ], [ %7, %5 ]
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 47
br i1 %9, label %10, label %5
10: ; preds = %5
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_epi32(int /*<<< orphan*/, int);
__m128i test_mm_slli_epi32_2(__m128i A, int B) { return _mm_slli_epi32(A, B); }


x86 assembly (clang, -O0):
<test_mm_slli_epi32_2>:
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 <_mm_slli_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_slli_epi32_2>:
jmp    1030 <_mm_slli_epi32@plt>

LLVM IR (-O0):
define i32 @test_mm_slli_epi32_2(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 @_mm_slli_epi32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_slli_epi32_2(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_slli_epi32(i32 %0, i32 %1)
ret i32 %3
}
char *utoa(unsigned int num, char *str, int radix) {
  *str = '\0';
  return str;
}


x86 assembly (clang, -O0):
<utoa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utoa>:
mov    %rsi,%rax
movb   $0x0,(%rsi)
ret

LLVM IR (-O0):
define i8* @utoa(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
store i8 0, i8* %7
%8 = load i8*, i8** %5
ret i8* %8
}

LLVM IR (-O2):
define i8* @utoa(i32 %0, i8* returned writeonly %1, i32 %2) {
store i8 0, i8* %1
ret i8* %1
}
int drv_exit(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @drv_exit() {
ret i32 0
}
/* Variables and functions */
unsigned int test_tree_value(unsigned int);
int cmain(void) {
  unsigned int i;
  for (i = 1; i < 512; i++) {
    unsigned int rv;
    rv = test_tree_value(i);
    if (rv != 0)
      return (int)rv;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x8(%rbp)
cmpl   $0x200,-0x8(%rbp)
jae    115f <cmain+0x4f>
mov    -0x8(%rbp),%edi
call   1030 <test_tree_value@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114c <cmain+0x3c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <cmain+0x56>
jmp    1151 <cmain+0x41>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <cmain+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmain>:
push   %rbx
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <test_tree_value@plt>
test   %eax,%eax
jne    1138 <cmain+0x28>
lea    0x1(%rbx),%ecx
cmp    $0x1ff,%ebx
mov    %ecx,%ebx
jne    1120 <cmain+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cmain() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %5, %1 ]
%3 = tail call i32 @test_tree_value(i32 %2)
%4 = icmp ne i32 %3, 0
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 512
%7 = select i1 %4, i1 true, i1 %6
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 %3
}
void __downgrade_write(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<__downgrade_write>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__downgrade_write>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.__downgrade_write = [18 x i8] c"__downgrade_write\00"
define void @__downgrade_write() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.__downgrade_write, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.__downgrade_write = [18 x i8] c"__downgrade_write\00"
define void @__downgrade_write() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.__downgrade_write, i64 0, i64 0))
ret void
}
__attribute__((no)) void nothing(void) { __asm__(""); }


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

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

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

LLVM IR (-O2):
define void @nothing() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void m_hupcl(fd, on) int fd;
int on;
{}


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

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

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

LLVM IR (-O2):
define void @m_hupcl(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
char *basename_get_base_name(char *, int /*<<< orphan*/);
char *basename_filename(char *argv_0) {
  return basename_get_base_name(argv_0, 0);
}


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

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

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

LLVM IR (-O2):
define i8* @basename_filename(i8* %0) {
%2 = tail call i8* @basename_get_base_name(i8* %0, i32 0)
ret i8* %2
}
void glGetVertexAttribfv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetVertexAttribfv() {
ret void
}
int cube(int m) { return m * m * m; }


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

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

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

LLVM IR (-O2):
define i32 @cube(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = mul nsw i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int read_standard_target_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(761, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<read_standard_target_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2f9,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_standard_target_Laurent_system>:
mov    $0x2f9,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @read_standard_target_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 761, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
char *mem_strdup(s) const char *s;
{
  return mem_strdup_debug(
      s,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/JoshuaSBrown/OPV_MonteCarloCode/refs/heads/"
      "master/CodeFix5/Code/MEM/mem.c",
      132);
}


x86 assembly (clang, -O0):
<mem_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x84,%edx
mov    $0x0,%al
call   1030 <mem_strdup_debug@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_strdup>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x84,%edx
xor    %eax,%eax
call   1030 <mem_strdup_debug@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
@.str = [164 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/JoshuaSBrown/OPV_MonteCarloCode/refs/heads/master/CodeFix5/Code/MEM/mem.c\00"
define i8* @mem_strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @mem_strdup_debug to i32 (i8*, i8*, i32, ...)*)(i8* %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str, i64 0, i64 0), i32 132)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
@.str = [164 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/JoshuaSBrown/OPV_MonteCarloCode/refs/heads/master/CodeFix5/Code/MEM/mem.c\00"
define i8* @mem_strdup(i8* %0) {
%2 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @mem_strdup_debug to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str, i64 0, i64 0), i32 132)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void errExit(char *str) {
  puts(str);
  exit(0);
}


x86 assembly (clang, -O0):
<errExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<errExit>:
push   %rax
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @errExit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @puts(i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @errExit(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
long time2sec(char const *);
long diffsec(const char *src1, const char *src2) {
  return time2sec(src1) - time2sec(src2);
}


x86 assembly (clang, -O0):
<diffsec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <time2sec@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <time2sec@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diffsec>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <time2sec@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <time2sec@plt>
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @diffsec(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i64 @time2sec(i8* %5)
%7 = load i8*, i8** %4
%8 = call i64 @time2sec(i8* %7)
%9 = sub nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @diffsec(i8* %0, i8* %1) {
%3 = tail call i64 @time2sec(i8* %0)
%4 = tail call i64 @time2sec(i8* %1)
%5 = sub nsw i64 %3, %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x6e() {
  Assert_real((isgraph(110)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              555, ("isgraph should be 1 for n"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x6e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6e,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x22b,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x6e>:
push   %rax
mov    $0x6e,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x22b,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for n\00"
define void @t_isgraph_0x6e() {
%1 = call i32 @isgraph(i32 110)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for n\00"
define void @t_isgraph_0x6e() {
%1 = tail call i32 @isgraph(i32 110)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 555, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}