xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ imprime(int *, int);
int main() {
  int tam = 5;
  int vet[] = {13, 25, 30, 4, 2};
  imprime(vet, tam);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <imprime@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <imprime@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.vet = [5 x i32] [i32 13, i32 25, i32 30, i32 4, i32 2]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [5 x i32]
store i32 0, i32* %1
store i32 5, i32* %2
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @imprime(i32* %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vet = [5 x i32] [i32 13, i32 25, i32 30, i32 4, i32 2]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @imprime(i32* %3, i32 5)
ret i32 0
}
double clampf(double v, double min, double max) {
  return v < min ? min : (v > max ? max : v);
}


x86 assembly (clang, -O0):
<clampf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <clampf+0x36>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1169 <clampf+0x69>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1155 <clampf+0x55>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    115f <clampf+0x5f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampf>:
minsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @clampf(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fcmp olt double %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load double, double* %5
br label %22
12: ; preds = %3
%13 = load double, double* %4
%14 = load double, double* %6
%15 = fcmp ogt double %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load double, double* %6
br label %20
18: ; preds = %12
%19 = load double, double* %4
br label %20
20: ; preds = %18, %16
%21 = phi double [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi double [ %11, %10 ], [ %21, %20 ]
ret double %23
}

LLVM IR (-O2):
define double @clampf(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = fcmp ogt double %0, %2
%6 = select i1 %5, double %2, double %0
%7 = select i1 %4, double %1, double %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int fakt, n;
  fakt = 10;
  n = 9;
  while (n > 0) {
    fakt = fakt * n;
    n = n - 1;
  }
  printf("%d \n", fakt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x9,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114f <main+0x3f>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3628800)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ karpekarnumber(long, long, char *);
scalar_t__ malloc(long);
int /*<<< orphan*/ scanf(char *, long *, long *);
int main() {
  long int x, y;
  char *brr;
  scanf("%ld%ld", &x, &y);
  brr = (char *)malloc((y - x + 2) * sizeof(char));
  karpekarnumber(x, y, brr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x18(%rbp),%rdi
sub    -0x10(%rbp),%rdi
add    $0x2,%rdi
shl    $0x0,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <karpekarnumber@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x8(%rsp),%rdi
sub    0x10(%rsp),%rdi
add    $0x2,%rdi
call   1030 <malloc@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %rax,%rdx
call   1040 <karpekarnumber@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%ld%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i8*
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3)
%6 = load i64, i64* %3
%7 = load i64, i64* %2
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 2
%10 = mul i64 %9, 1
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %4
%13 = load i64, i64* %2
%14 = load i64, i64* %3
%15 = load i8*, i8** %4
%16 = call i32 @karpekarnumber(i64 %13, i64 %14, i8* %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%ld%ld\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%6 = load i64, i64* %2
%7 = load i64, i64* %1
%8 = add i64 %6, 2
%9 = sub i64 %8, %7
%10 = call i64 @malloc(i64 %9)
%11 = inttoptr i64 %10 to i8*
%12 = load i64, i64* %1
%13 = load i64, i64* %2
%14 = call i32 @karpekarnumber(i64 %12, i64 %13, i8* %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pow(int, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) {
  printf("%lf\n", pow(2, 4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <pow@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <pow@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = tail call i32 @pow(i32 2, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void *mhs_malloc(int);
void *mhs_memdup(void const *mem, int size) {
  void *new_mem;
  if (mem) {
    new_mem = mhs_malloc(size);
    memcpy(new_mem, mem, size);
  } else
    new_mem = NULL;
  return (new_mem);
}


x86 assembly (clang, -O0):
<mhs_memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115b <mhs_memdup+0x3b>
mov    -0xc(%rbp),%edi
call   1040 <mhs_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
jmp    1163 <mhs_memdup+0x43>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mhs_memdup>:
push   %rbp
push   %r14
push   %rbx
test   %rdi,%rdi
je     1149 <mhs_memdup+0x29>
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %esi,%edi
call   1040 <mhs_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r14d,%edx
call   1030 <memcpy@plt>
jmp    114b <mhs_memdup+0x2b>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @mhs_memdup(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i8* @mhs_malloc(i32 %1)
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %1)
br label %7
7: ; preds = %2, %4
%8 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %8
}
void no_op_free(void *arg) {}


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

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

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

LLVM IR (-O2):
define void @no_op_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int putc(int /*<<< orphan*/);
main() {
  char msg[] = "Hello World!\n";
  char *ptr;
  int res;
  ptr = msg;
  while (*ptr)
    res = putc(*ptr++);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1182 <main+0x62>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%edi
call   1030 <putc@plt>
mov    %eax,-0x24(%rbp)
jmp    1156 <main+0x36>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0xa21646c726f57,%rax
mov    %rax,0x6(%rsp)
movabs $0x6f57206f6c6c6548,%rax
20 57 6f
mov    %rax,(%rsp)
lea    0x1(%rsp),%rbx
mov    $0x48,%al
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1150 <main+0x30>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@__const.main.msg = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [14 x i8]* %2 to i8*
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
store i8* %6, i8** %3
br label %7
7: ; preds = %11, %0
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
%16 = call i32 @putc(i32 %15)
store i32 %16, i32* %4
br label %7
17: ; preds = %7
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@__const.main.msg = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = phi i8 [ %9, %3 ], [ 72, %0 ]
%5 = phi i8* [ %6, %3 ], [ %2, %0 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = sext i8 %4 to i32
%8 = tail call i32 @putc(i32 %7)
%9 = load i8, i8* %6
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = tail call i32 @exit(i32 0)
unreachable
}
void removeTopWall(int (*maze)[13], int startRow, int startCol) {
  int removeRow, removeCol;
  removeRow = ((startRow - 1) + 1) * 2;
  removeCol = (startCol)*2 - 1 + 2;
  maze[removeRow][removeCol] = 0;
}


x86 assembly (clang, -O0):
<removeTopWall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeTopWall>:
add    %esi,%esi
lea    (%rdx,%rdx,1),%eax
add    $0x1,%eax
movslq %esi,%rcx
cltq
imul   $0x34,%rcx,%rcx
add    %rdi,%rcx
movl   $0x0,(%rcx,%rax,4)
ret

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

LLVM IR (-O2):
define void @removeTopWall([13 x i32]* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = shl nsw i32 %1, 1
%5 = shl nsw i32 %2, 1
%6 = or i32 %5, 1
%7 = sext i32 %4 to i64
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 %7, i64 %8
store i32 0, i32* %9
ret void
}
/* Variables and functions */
int fun_stub_base_7_stub(short);
int /*<<< orphan*/ printf(char *, int);
int fun_stub_base_7_call(short a) {
  printf("fun_stub_base_7_call:a = %d \n", a);
  int x = fun_stub_base_7_stub(a);
  printf("fun_stub_base_7_stub return %d\n", x);
  return x;
}


x86 assembly (clang, -O0):
<fun_stub_base_7_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movswl -0x2(%rbp),%edi
call   1040 <fun_stub_base_7_stub@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_7_call>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <fun_stub_base_7_stub@plt>
mov    %eax,%ebx
lea    0xedd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"fun_stub_base_7_call:a = %d \0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_7_stub return %d\0A\00"
define i32 @fun_stub_base_7_call(i16 signext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i16, i16* %2
%8 = call i32 @fun_stub_base_7_stub(i16 signext %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [30 x i8] c"fun_stub_base_7_call:a = %d \0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_7_stub return %d\0A\00"
define i32 @fun_stub_base_7_call(i16 signext %0) {
%2 = sext i16 %0 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @fun_stub_base_7_stub(i16 signext %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 %4
}
void GI2C1_Deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @GI2C1_Deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ del_port_vlan_h3c(char *, int, int, int);
int _del_port_vlan(int sb, char *setport, int vlanid, int rfd, int wfd) {
  switch (sb) {
  case 0:
    del_port_vlan_h3c(setport, vlanid, rfd, wfd);
    break;
  default:
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_del_port_vlan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    1150 <_del_port_vlan+0x40>
jmp    1139 <_del_port_vlan+0x29>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <del_port_vlan_h3c@plt>
jmp    115c <_del_port_vlan+0x4c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <_del_port_vlan+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_del_port_vlan>:
mov    $0xffffffff,%eax
test   %edi,%edi
je     111a <_del_port_vlan+0xa>
ret
push   %rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8d,%ecx
call   1030 <del_port_vlan_h3c@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @_del_port_vlan(i32 %0, i8* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%12 = load i32, i32* %7
switch i32 %12, label %19 [
i32 0, label %13
]
13: ; preds = %5
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = call i32 @del_port_vlan_h3c(i8* %14, i32 %15, i32 %16, i32 %17)
br label %20
19: ; preds = %5
store i32 -1, i32* %6
br label %21
20: ; preds = %13
store i32 0, i32* %6
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %6
ret i32 %22
}

LLVM IR (-O2):
define i32 @_del_port_vlan(i32 %0, i8* %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 @del_port_vlan_h3c(i8* %1, i32 %2, i32 %3, i32 %4)
br label %9
9: ; preds = %5, %7
%10 = phi i32 [ 0, %7 ], [ -1, %5 ]
ret i32 %10
}
double fmin(double x, double y) { return (x < y) ? x : y; }


x86 assembly (clang, -O0):
<fmin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <fmin+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <fmin+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmin>:
minsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @fmin(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void rule_dgp_act_init(const struct XCSF *xcsf, struct Cl *c) {
  (void)xcsf;
  (void)c;
}


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

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

LLVM IR (-O0):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_dgp_act_init(%struct.XCSF* %0, %struct.Cl* %1) {
%3 = alloca %struct.XCSF*
%4 = alloca %struct.Cl*
store %struct.XCSF* %0, %struct.XCSF** %3
store %struct.Cl* %1, %struct.Cl** %4
%5 = load %struct.XCSF*, %struct.XCSF** %3
%6 = load %struct.Cl*, %struct.Cl** %4
ret void
}

LLVM IR (-O2):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_dgp_act_init(%struct.XCSF* nocapture %0, %struct.Cl* nocapture %1) {
ret void
}
void fc150(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    goto a;
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
a:;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc150(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
br label %20
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %13, %1
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc150(i32 %0) {
ret void
}
char digit_conv(short digit) {
  if (digit < 10) {
    return digit + '0';
  }
  return digit - 10 + 'A';
}


x86 assembly (clang, -O0):
<digit_conv>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0xa,%eax
jge    1127 <digit_conv+0x27>
movswl -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1134 <digit_conv+0x34>
movswl -0x4(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_conv>:
cmp    $0xa,%di
mov    $0x30,%ecx
mov    $0x37,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @digit_conv(i16 signext %0) {
%2 = alloca i8
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i16, i16* %3
%9 = sext i16 %8 to i32
%10 = add nsw i32 %9, 48
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %18
12: ; preds = %1
%13 = load i16, i16* %3
%14 = sext i16 %13 to i32
%15 = sub nsw i32 %14, 10
%16 = add nsw i32 %15, 65
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %18
18: ; preds = %12, %7
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @digit_conv(i16 signext %0) {
%2 = icmp slt i16 %0, 10
%3 = trunc i16 %0 to i8
%4 = select i1 %2, i8 48, i8 55
%5 = add i8 %4, %3
ret i8 %5
}
void __cxa_pure_virtual(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<__cxa_pure_virtual>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <__cxa_pure_virtual+0x9>
jmp    1109 <__cxa_pure_virtual+0x9>

x86 assembly (clang, -O2):
<__cxa_pure_virtual>:
jmp    1100 <__cxa_pure_virtual>

LLVM IR (-O0):
define void @__cxa_pure_virtual() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @__cxa_pure_virtual() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t r32be(const uint8_t *buf) {
  return (((uint32_t)buf[0]) << 24) | (((uint32_t)buf[1]) << 16) |
         (((uint32_t)buf[2]) << 8) | ((uint32_t)buf[3]);
}


x86 assembly (clang, -O0):
<r32be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @r32be(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %0, i64 2
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i64, i64* %0, i64 3
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  float result, a[3];
  a[0] = 1.0000;
  a[1] = -0.375;
  a[2] = 0.1875;
  result = a[0] + a[1] + a[2];
  assert(result == 0.8124);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xef0(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xedf(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xece(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9c(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca float
%2 = alloca [3 x float]
%3 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
store float 1.000000e+00, float* %3
%4 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 1
store float -3.750000e-01, float* %4
%5 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 2
store float 1.875000e-01, float* %5
%6 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%7 = load float, float* %6
%8 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 1
%9 = load float, float* %8
%10 = fadd float %7, %9
%11 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 2
%12 = load float, float* %11
%13 = fadd float %10, %12
store float %13, float* %1
%14 = load float, float* %1
%15 = fpext float %14 to double
%16 = fcmp oeq double %15, 8.124000e-01
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint16_t;

/* Variables and functions */
uint16_t rtp_get_seqnum(const uint8_t *p_rtp) {
  return (p_rtp[2] << 8) | p_rtp[3];
}


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

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

LLVM IR (-O0):
define i32 @rtp_get_seqnum(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 3
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @rtp_get_seqnum(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = load i32, i32* %5
%7 = or i32 %4, %6
ret i32 %7
}
int annotated_inc_1_2(int i) { return ++i; }


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

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

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

LLVM IR (-O2):
define i32 @annotated_inc_1_2(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
XMoveWindow() {}


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

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

LLVM IR (-O0):
define i32 @XMoveWindow() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XMoveWindow() {
ret i32 undef
}
int test_imm_BAuint32_mem(unsigned int *val) {
  return ((*val) & (0xBA << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_BAuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 186
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *strchr(char const *, char);
const char *skip_project(const char *id) {
  char *colon = strchr(id, ':');
  return colon ? (colon + 1) : id;
}


x86 assembly (clang, -O0):
<skip_project>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <skip_project+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <skip_project+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_project>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3a,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_project(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 58)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @skip_project(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 58)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int foo(int);
int bar(int x) { return foo(x); }


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

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = tail call i32 @foo(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int LLVMFuzzerMutate(int /*<<< orphan*/ *, size_t, size_t);
int /*<<< orphan*/ puts(char *);
int LLVMFuzzerCustomMutator(uint8_t *data, size_t size, size_t max,
                            unsigned int seed) {
  puts("CUSTOM MUTATOR");
  return LLVMFuzzerMutate(data, size, max);
}


x86 assembly (clang, -O0):
<LLVMFuzzerCustomMutator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <LLVMFuzzerMutate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LLVMFuzzerCustomMutator>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <LLVMFuzzerMutate@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"CUSTOM MUTATOR\00"
define i32 @LLVMFuzzerCustomMutator(i32* %0, i64 %1, i64 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
store i32* %0, i32** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = load i32*, i32** %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = call i32 @LLVMFuzzerMutate(i32* %10, i64 %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
@.str = [15 x i8] c"CUSTOM MUTATOR\00"
define i32 @LLVMFuzzerCustomMutator(i32* %0, i64 %1, i64 %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @LLVMFuzzerMutate(i32* %0, i64 %1, i64 %2)
ret i32 %6
}
int XrmCombineFileDatabase() {}


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

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

LLVM IR (-O0):
define i32 @XrmCombineFileDatabase() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XrmCombineFileDatabase() {
ret i32 undef
}
int ord(char c) { return c - 'P'; }


x86 assembly (clang, -O0):
<ord>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x50,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ord(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -80
ret i32 %3
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ selcall_deinit(struct demod_state *);
void dzvei_deinit(struct demod_state *s) { selcall_deinit(s); }


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

x86 assembly (clang, -O2):
<dzvei_deinit>:
jmp    1030 <selcall_deinit@plt>

LLVM IR (-O0):
%struct.demod_state = type { i32 }
define void @dzvei_deinit(%struct.demod_state* %0) {
%2 = alloca %struct.demod_state*
store %struct.demod_state* %0, %struct.demod_state** %2
%3 = load %struct.demod_state*, %struct.demod_state** %2
%4 = call i32 @selcall_deinit(%struct.demod_state* %3)
ret void
}

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @dzvei_deinit(%struct.demod_state* %0) {
%2 = tail call i32 @selcall_deinit(%struct.demod_state* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, size_t);
void __attribute__((weak)) __aeabi_memset4_impl2(void *dest, size_t n, int c) {
  memset(dest, c, n);
}


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

x86 assembly (clang, -O2):
<__aeabi_memset4_impl2>:
mov    %rsi,%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define weak void @__aeabi_memset4_impl2(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %2, i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_load_si128(int /*<<< orphan*/ const *);
__m128i test_mm_load_si128(__m128i const *A) { return _mm_load_si128(A); }


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

x86 assembly (clang, -O2):
<test_mm_load_si128>:
jmp    1030 <_mm_load_si128@plt>

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

LLVM IR (-O2):
define i32 @test_mm_load_si128(i32* %0) {
%2 = tail call i32 @_mm_load_si128(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ error_quit(char *);
int listen(int, int);
void Listen(int sockfd, int backlog) {
  if (listen(sockfd, backlog) == -1)
    error_quit("Listen");
}


x86 assembly (clang, -O0):
<Listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <listen@plt>
cmp    $0xffffffff,%eax
jne    114e <Listen+0x2e>
lea    0xeb7(%rip),%rdi
call   1030 <error_quit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Listen>:
push   %rax
call   1040 <listen@plt>
cmp    $0xffffffff,%eax
je     112d <Listen+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <error_quit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"Listen\00"
define void @Listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error_quit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_POT_POWER_PIN() { clear_io_bit(0x70, 7); }


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

x86 assembly (clang, -O2):
<TOSH_CLR_POT_POWER_PIN>:
mov    $0x70,%edi
mov    $0x7,%esi
jmp    1030 <clear_io_bit@plt>

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

LLVM IR (-O2):
define void @TOSH_CLR_POT_POWER_PIN() {
%1 = tail call i32 @clear_io_bit(i32 112, i32 7)
ret void
}
void conf_rlimits(void) {}


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

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

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

LLVM IR (-O2):
define void @conf_rlimits() {
ret void
}
struct s3c24x0_i2s *s3c24x0_get_base_i2s(void) {
  return (struct s3c24x0_i2s *)0x15508000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_i2s = type opaque
define %struct.s3c24x0_i2s* @s3c24x0_get_base_i2s() {
ret %struct.s3c24x0_i2s* inttoptr (i64 357597184 to %struct.s3c24x0_i2s*)
}

LLVM IR (-O2):
%struct.s3c24x0_i2s = type opaque
define %struct.s3c24x0_i2s* @s3c24x0_get_base_i2s() {
ret %struct.s3c24x0_i2s* inttoptr (i64 357597184 to %struct.s3c24x0_i2s*)
}
void ajTreeDummyFunction(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ajTreeDummyFunction() {
ret void
}
double umrechnung_land_mi_in_km(double strecke) {
  const double umrechnungsfaktor = 1.609344;
  double strecke_in_km = strecke * umrechnungsfaktor;
  return strecke_in_km;
}


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

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

LLVM IR (-O0):
define double @umrechnung_land_mi_in_km(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 0x3FF9BFDF7E8038A0, double* %3
%5 = load double, double* %2
%6 = fmul double %5, 0x3FF9BFDF7E8038A0
store double %6, double* %4
%7 = load double, double* %4
ret double %7
}

LLVM IR (-O2):
define double @umrechnung_land_mi_in_km(double %0) {
%2 = fmul double %0, 0x3FF9BFDF7E8038A0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void pipe_sign_handler(int a) {
  write(0, "\n Problema con pipeline.\n ",
        sizeof("\n Problema con pipeline.\n"));
}


x86 assembly (clang, -O0):
<pipe_sign_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
lea    0xedc(%rip),%rsi
mov    $0x1a,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe_sign_handler>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
mov    $0x1a,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"\0A Problema con pipeline.\0A \00"
define void @pipe_sign_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0A Problema con pipeline.\0A \00"
define void @pipe_sign_handler(i32 %0) {
%2 = tail call i32 @write(i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
ret void
}
int writeTCPPacket(char *buf, int nbuf) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @writeTCPPacket(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Type definitions */
struct sembuf {
  int sem_op;
  int /*<<< orphan*/ sem_flg;
  scalar_t__ sem_num;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void sem1PO(int id_sem) {
  struct sembuf op;
  op.sem_num = 0;
  op.sem_op = -1;
  op.sem_flg = SEM_UNDO;
  semop(id_sem, &op, 1);
}


x86 assembly (clang, -O0):
<sem1PO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem1PO>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i64 }
@SEM_UNDO = global i32 0
define void @sem1PO(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sembuf
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 2
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 0
store i32 -1, i32* %5
%6 = load i32, i32* @SEM_UNDO
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 1
store i32 %6, i32* %7
%8 = load i32, i32* %2
%9 = call i32 @semop(i32 %8, %struct.sembuf* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i64 }
@SEM_UNDO = global i32 0
define void @sem1PO(i32 %0) {
%2 = alloca %struct.sembuf
%3 = bitcast %struct.sembuf* %2 to i8*
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 2
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 0
store i32 -1, i32* %5
%6 = load i32, i32* @SEM_UNDO
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 1
store i32 %6, i32* %7
%8 = call i32 @semop(i32 %0, %struct.sembuf* %2, i32 1)
ret void
}