xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ PrintArr(int *, int);
int /*<<< orphan*/ Sort(int *, int);
int main() {
  int len = 5;
  int arr[5] = {5, 2, 4, 3, 1};
  PrintArr(arr, len);
  Sort(arr, len);
  PrintArr(arr, len);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x5,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <PrintArr@plt>
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <Sort@plt>
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <PrintArr@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xee5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <PrintArr@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <Sort@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <PrintArr@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [5 x i32] [i32 5, i32 2, i32 4, i32 3, i32 1]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 5, i32* %1
%3 = bitcast [5 x i32]* %2 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%5 = load i32, i32* %1
%6 = call i32 @PrintArr(i32* %4, i32 %5)
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %1
%9 = call i32 @Sort(i32* %7, i32 %8)
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%11 = load i32, i32* %1
%12 = call i32 @PrintArr(i32* %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [5 x i32] [i32 5, i32 2, i32 4, i32 3, i32 1]
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 @PrintArr(i32* %3, i32 5)
%5 = call i32 @Sort(i32* %3, i32 5)
%6 = call i32 @PrintArr(i32* %3, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hola Munro\n");
  return 15;
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Hola Munro\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 15
}
int find_base(int *table, int index) {
  int a = index;
  while (table[a] != a) {
    a = table[a];
  }
  return a;
}


x86 assembly (clang, -O0):
<find_base>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
je     1138 <find_base+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
jmp    1111 <find_base+0x11>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_base>:
mov    %esi,%eax
movslq %esi,%rcx
mov    (%rdi,%rcx,4),%esi
cmp    %ecx,%esi
jne    1100 <find_base>
ret

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

LLVM IR (-O2):
define i32 @find_base(i32* nocapture %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %7, %3 ]
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, %4
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 %4
}
void IIR_LP2_Balance(double *pBuffer) {
  pBuffer[0] = pBuffer[1] = pBuffer[2] = pBuffer[4] = pBuffer[5] = pBuffer[3];
}


x86 assembly (clang, -O0):
<IIR_LP2_Balance>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<IIR_LP2_Balance>:
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x28(%rdi)
movsd  %xmm0,0x20(%rdi)
movsd  %xmm0,0x10(%rdi)
movsd  %xmm0,0x8(%rdi)
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @IIR_LP2_Balance(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 3
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 5
store double %5, double* %7
%8 = load double*, double** %2
%9 = getelementptr inbounds double, double* %8, i64 4
store double %5, double* %9
%10 = load double*, double** %2
%11 = getelementptr inbounds double, double* %10, i64 2
store double %5, double* %11
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
store double %5, double* %13
%14 = load double*, double** %2
%15 = getelementptr inbounds double, double* %14, i64 0
store double %5, double* %15
ret void
}

LLVM IR (-O2):
define void @IIR_LP2_Balance(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 3
%3 = load double, double* %2
%4 = getelementptr inbounds double, double* %0, i64 5
store double %3, double* %4
%5 = getelementptr inbounds double, double* %0, i64 4
store double %3, double* %5
%6 = getelementptr inbounds double, double* %0, i64 2
store double %3, double* %6
%7 = getelementptr inbounds double, double* %0, i64 1
store double %3, double* %7
store double %3, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int test[] = {4, 5, 3, 2, 6};
  int printArrayCounter = 0;
  for (; printArrayCounter < 5; printArrayCounter++) {
    printf("%d\n", test[printArrayCounter]);
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
jge    1171 <main+0x61>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1145 <main+0x35>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Variables and functions */
char *rindex(char *, char);
char *getv4addr(char *fromhost) {
  char *addr;
  addr = rindex(fromhost, ':');
  return ++addr;
}


x86 assembly (clang, -O0):
<getv4addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <rindex@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getv4addr>:
push   %rax
mov    $0x3a,%esi
call   1030 <rindex@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @getv4addr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @rindex(i8* %4, i8 signext 58)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
ret i8* %7
}

LLVM IR (-O2):
define i8* @getv4addr(i8* %0) {
%2 = tail call i8* @rindex(i8* %0, i8 signext 58)
%3 = getelementptr inbounds i8, i8* %2, i64 1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char **argv) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("%d : %s\n", i, argv[i]);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d : %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
int execute_mmap2() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_mmap2() {
ret i32 0
}
/* Variables and functions */
char *splitpath(char **, char);
int /*<<< orphan*/ strreverse(char *);
char *splitpath_end(char **path, char sep) {
  char *component;
  strreverse(*path);
  component = splitpath(path, sep);
  strreverse(*path);
  strreverse(component);
  return component;
}


x86 assembly (clang, -O0):
<splitpath_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strreverse@plt>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <splitpath@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strreverse@plt>
mov    -0x18(%rbp),%rdi
call   1030 <strreverse@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<splitpath_end>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <strreverse@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <splitpath@plt>
mov    %rax,%rbp
mov    (%rbx),%rdi
call   1030 <strreverse@plt>
mov    %rbp,%rdi
call   1030 <strreverse@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @splitpath_end(i8** %0, i8 signext %1) {
%3 = alloca i8**
%4 = alloca i8
%5 = alloca i8*
store i8** %0, i8*** %3
store i8 %1, i8* %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @strreverse(i8* %7)
%9 = load i8**, i8*** %3
%10 = load i8, i8* %4
%11 = call i8* @splitpath(i8** %9, i8 signext %10)
store i8* %11, i8** %5
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = call i32 @strreverse(i8* %13)
%15 = load i8*, i8** %5
%16 = call i32 @strreverse(i8* %15)
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @splitpath_end(i8** %0, i8 signext %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @strreverse(i8* %3)
%5 = tail call i8* @splitpath(i8** %0, i8 signext %1)
%6 = load i8*, i8** %0
%7 = tail call i32 @strreverse(i8* %6)
%8 = tail call i32 @strreverse(i8* %5)
ret i8* %5
}
unsigned char inb(unsigned short _port) {
  unsigned char ret;
  asm volatile("inb %1, %0" : "=a"(ret) : "dN"(_port));
  return ret;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
const char *fe_warp_inverse_linear_doc() {
  return "inverse_linear :== < w' = x / a >";
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"inverse_linear :== < w' = x / a >\00"
define i8* @fe_warp_inverse_linear_doc() {
ret i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [34 x i8] c"inverse_linear :== < w' = x / a >\00"
define i8* @fe_warp_inverse_linear_doc() {
ret i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg4setBank4(int);
void m31setParams5004(uint16_t addr, uint8_t val) {
  (void)addr;
  prg4setBank4(val << 12);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xc,%edi
jmp    1030 <prg4setBank4@plt>

LLVM IR (-O0):
define void @m31setParams5004(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 = shl i32 %6, 12
%8 = call i32 @prg4setBank4(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m31setParams5004(i32 %0, i32 %1) {
%3 = shl i32 %1, 12
%4 = tail call i32 @prg4setBank4(i32 %3)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printPrimePairs(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int input;
  scanf("%d", &input);
  printPrimePairs(input);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <printPrimePairs@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <printPrimePairs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @printPrimePairs(i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printPrimePairs(i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
int proc_4(jmp_buf env, int i) {
  if (i == 0)
    longjmp(env, 1);
  return 14 % i;
}


x86 assembly (clang, -O0):
<proc_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1135 <proc_4+0x25>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <longjmp@plt>
mov    $0xe,%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_4>:
test   %esi,%esi
je     1120 <proc_4+0x10>
mov    $0xe,%eax
xor    %edx,%edx
idiv   %esi
mov    %edx,%eax
ret
push   %rax
mov    $0x1,%esi
call   1030 <longjmp@plt>

LLVM IR (-O0):
define i32 @proc_4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = call i32 @longjmp(i32 %8, i32 1)
unreachable
10: ; preds = %2
%11 = load i32, i32* %4
%12 = srem i32 14, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @proc_4(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @longjmp(i32 %0, i32 1)
unreachable
6: ; preds = %2
%7 = srem i32 14, %1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ntohb2(int /*<<< orphan*/ *);
uint16_t ntohs(uint16_t network) { return ntohb2((uint8_t *)&network); }


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

x86 assembly (clang, -O2):
<ntohs>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ntohb2@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ntohs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ntohb2(i32* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @ntohs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ntohb2(i32* %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int get_line(int, char *, int);
scalar_t__ strcmp(char *, char *);
void discardheaders(int client) {
  char buf[1024];
  int numchars = 1;
  while ((numchars > 0) && strcmp("\n", buf))
    numchars = get_line(client, buf, sizeof(buf));
}


x86 assembly (clang, -O0):
<discardheaders>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x414(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x414(%rbp)
mov    %al,-0x415(%rbp)
jle    116d <discardheaders+0x4d>
lea    -0x410(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x415(%rbp)
mov    -0x415(%rbp),%al
test   $0x1,%al
jne    1180 <discardheaders+0x60>
jmp    119f <discardheaders+0x7f>
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
call   1030 <get_line@plt>
mov    %eax,-0x414(%rbp)
jmp    1138 <discardheaders+0x18>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<discardheaders>:
push   %rbp
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %edi,%ebp
lea    0xecc(%rip),%r14
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1163 <discardheaders+0x43>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1030 <get_line@plt>
test   %eax,%eax
jg     1140 <discardheaders+0x20>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @discardheaders(i32 %0) {
%2 = alloca i32
%3 = alloca [1024 x i8]
%4 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%10 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %5
%13 = phi i1 [ false, %5 ], [ %11, %8 ]
br i1 %13, label %14, label %18
14: ; preds = %12
%15 = load i32, i32* %2
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%17 = call i32 @get_line(i32 %15, i8* %16, i32 1024)
store i32 %17, i32* %4
br label %5
18: ; preds = %12
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @discardheaders(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %1, %7
%5 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i32 @get_line(i32 %0, i8* %3, i32 1024)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %4, label %10
10: ; preds = %7, %4
ret void
}
isin(s, c) char *s;
int c;
{
  for (; *s != '\0'; s++)
    if (*s == c)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<isin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114d <isin+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1137 <isin+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1154 <isin+0x54>
jmp    113c <isin+0x3c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <isin+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isin>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <isin+0x22>
add    $0x1,%rdi
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1123 <isin+0x23>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <isin+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @isin(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %8
5: ; preds = %8
%6 = load i8, i8* %13
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %13, %5 ], [ %0, %2 ]
%11 = sext i8 %9 to i32
%12 = icmp eq i32 %11, %1
%13 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %12, label %14, label %5
14: ; preds = %8, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %15
}
void reset_var(int chk[]) {
  long i;
  for (i = 0; i < 26; i++)
    chk[i] = 0;
}


x86 assembly (clang, -O0):
<reset_var>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x1a,-0x10(%rbp)
jge    113b <reset_var+0x3b>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <reset_var+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_var>:
xorps  %xmm0,%xmm0
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movq   $0x0,0x60(%rdi)
ret

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

LLVM IR (-O2):
define void @reset_var(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
/* Variables and functions */
short eval_5cards_fast(int, int, int, int, int);
short eval_5hand_fast(int *hand) {
  return eval_5cards_fast(hand[0], hand[1], hand[2], hand[3], hand[4]);
}


x86 assembly (clang, -O0):
<eval_5hand_fast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r8d
call   1030 <eval_5cards_fast@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_5hand_fast>:
mov    (%rdi),%eax
mov    0x4(%rdi),%esi
mov    0x8(%rdi),%edx
mov    0xc(%rdi),%ecx
mov    0x10(%rdi),%r8d
mov    %eax,%edi
jmp    1030 <eval_5cards_fast@plt>

LLVM IR (-O0):
define signext i16 @eval_5hand_fast(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 2
%11 = load i32, i32* %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 3
%14 = load i32, i32* %13
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 4
%17 = load i32, i32* %16
%18 = call signext i16 @eval_5cards_fast(i32 %5, i32 %8, i32 %11, i32 %14, i32 %17)
ret i16 %18
}

LLVM IR (-O2):
define signext i16 @eval_5hand_fast(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 4
%10 = load i32, i32* %9
%11 = tail call signext i16 @eval_5cards_fast(i32 %2, i32 %4, i32 %6, i32 %8, i32 %10)
ret i16 %11
}
float atanf(float arg) {
  float satan(float);
  if (arg > 0) {
    return (satan(arg));
  } else {
    return (-satan(-arg));
  }
}


x86 assembly (clang, -O0):
<atanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1142 <atanf+0x32>
movss  -0x8(%rbp),%xmm0
call   1030 <satan@plt>
movss  %xmm0,-0x4(%rbp)
jmp    116b <atanf+0x5b>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <satan@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atanf>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    111d <atanf+0xd>
jmp    1030 <satan@plt>
push   %rax
xorps  0xedb(%rip),%xmm0
call   1030 <satan@plt>
xorps  0xecf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @atanf(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %3
%8 = call float @satan(float %7)
store float %8, float* %2
br label %14
9: ; preds = %1
%10 = load float, float* %3
%11 = fneg float %10
%12 = call float @satan(float %11)
%13 = fneg float %12
store float %13, float* %2
br label %14
14: ; preds = %9, %6
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @atanf(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call float @satan(float %0)
br label %9
5: ; preds = %1
%6 = fneg float %0
%7 = tail call float @satan(float %6)
%8 = fneg float %7
br label %9
9: ; preds = %5, %3
%10 = phi float [ %4, %3 ], [ %8, %5 ]
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ getpid();
int main(int argc, char **argv) {
  for (;;) {
    getpid();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getpid@plt>
jmp    1120 <main+0x10>

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
br label %6
6: ; preds = %6, %2
%7 = call i32 (...) @getpid()
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 (...) @getpid()
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ f(char *, char *, char *, int /*<<< orphan*/);
scalar_t__ strcmp(char *, char *);
int main(void) {
  char buf[10];
  f(buf, "%s", "asdf", 0);
  if (strcmp(buf, "asdf"))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
lea    0xeb6(%rip),%rsi
lea    0xeb2(%rip),%rdx
xor    %ecx,%ecx
call   1040 <f@plt>
lea    -0xe(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1179 <main+0x49>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xec2(%rip),%rsi
lea    0xebe(%rip),%r14
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %ecx,%ecx
call   1040 <f@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1171 <main+0x41>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @f(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @f(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
%4 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ fmt;

/* Variables and functions */
int /*<<< orphan*/ rb_scan_args_lead_p(char const *);
int rb_scan_args_var_idx(const char *fmt) {
  return (!rb_scan_args_lead_p(fmt)                 ? 0
          : !((unsigned char)((fmt[1]) - '0') < 10) ? 1
                                                    : 2);
}


x86 assembly (clang, -O0):
<rb_scan_args_var_idx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rb_scan_args_lead_p@plt>
cmp    $0x0,%eax
jne    1138 <rb_scan_args_var_idx+0x28>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <rb_scan_args_var_idx+0x52>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
sub    $0x30,%eax
movzbl %al,%eax
cmp    $0xa,%eax
setl   %dl
xor    $0xff,%dl
mov    $0x2,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_scan_args_var_idx>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rb_scan_args_lead_p@plt>
test   %eax,%eax
je     112e <rb_scan_args_var_idx+0x1e>
mov    0x1(%rbx),%al
add    $0xc6,%al
cmp    $0xf6,%al
mov    $0x2,%eax
sbb    $0x0,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rb_scan_args_var_idx(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @rb_scan_args_lead_p(i8* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
br label %19
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = sub nsw i32 %11, 48
%13 = trunc i32 %12 to i8
%14 = zext i8 %13 to i32
%15 = icmp slt i32 %14, 10
%16 = xor i1 %15, true
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 1, i32 2
br label %19
19: ; preds = %7, %6
%20 = phi i32 [ 0, %6 ], [ %18, %7 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @rb_scan_args_var_idx(i8* %0) {
%2 = tail call i32 @rb_scan_args_lead_p(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = add i8 %6, -58
%8 = icmp ult i8 %7, -10
%9 = select i1 %8, i32 1, i32 2
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
char *intToRoman(int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("%s\n", intToRoman(1000));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3e8,%edi
call   1030 <intToRoman@plt>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @intToRoman(i32 1000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Type definitions */
typedef int u_int16_t;
struct buf {
  int dummy;
};

/* Variables and functions */
int buf_add(struct buf *, void *, int);
int /*<<< orphan*/ buf_free(struct buf *);
int imsg_add(struct buf *msg, void *data, u_int16_t datalen) {
  if (datalen)
    if (buf_add(msg, data, datalen) == -1) {
      buf_free(msg);
      return (-1);
    }
  return (datalen);
}


x86 assembly (clang, -O0):
<imsg_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1170 <imsg_add+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <buf_add@plt>
cmp    $0xffffffff,%eax
jne    116b <imsg_add+0x4b>
mov    -0x10(%rbp),%rdi
call   1030 <buf_free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <imsg_add+0x56>
jmp    1170 <imsg_add+0x50>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imsg_add>:
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
je     1146 <imsg_add+0x26>
mov    %edx,%ebx
mov    %rdi,%r14
call   1040 <buf_add@plt>
cmp    $0xffffffff,%eax
jne    1148 <imsg_add+0x28>
mov    %r14,%rdi
call   1030 <buf_free@plt>
mov    $0xffffffff,%ebx
jmp    1148 <imsg_add+0x28>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.buf = type { i32 }
define i32 @imsg_add(%struct.buf* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.buf*
%6 = alloca i8*
%7 = alloca i32
store %struct.buf* %0, %struct.buf** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load %struct.buf*, %struct.buf** %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @buf_add(%struct.buf* %11, i8* %12, i32 %13)
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %19
16: ; preds = %10
%17 = load %struct.buf*, %struct.buf** %5
%18 = call i32 @buf_free(%struct.buf* %17)
store i32 -1, i32* %4
br label %22
19: ; preds = %10
br label %20
20: ; preds = %19, %3
%21 = load i32, i32* %7
store i32 %21, i32* %4
br label %22
22: ; preds = %20, %16
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
%struct.buf = type { i32 }
define i32 @imsg_add(%struct.buf* %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = tail call i32 @buf_add(%struct.buf* %0, i8* %1, i32 %2)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @buf_free(%struct.buf* %0)
br label %10
10: ; preds = %3, %5, %8
%11 = phi i32 [ -1, %8 ], [ %2, %5 ], [ 0, %3 ]
ret i32 %11
}
void defineStaticVar() {
  static const int x = 0;
  static int y = 0;
}


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

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

LLVM IR (-O0):
@defineStaticVar.x = internal constant i32 0
@defineStaticVar.y = internal global i32 0
define void @defineStaticVar() {
ret void
}

LLVM IR (-O2):
define void @defineStaticVar() {
ret void
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ has_ic();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_int(int /*<<< orphan*/);
void cmd_has_ic(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_int(has_ic());
}


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

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

LLVM IR (-O0):
define void @cmd_has_ic(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @has_ic()
%12 = call i32 @report_int(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_has_ic(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @has_ic()
%8 = tail call i32 @report_int(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ call(char *);
mult() { call("ccmult"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"ccmult\00"
define i32 @mult() {
%1 = tail call i32 @call(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ButtonISR_Disable();
void ButtonISR_Stop(void) { ButtonISR_Disable(); }


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

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

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

LLVM IR (-O2):
define void @ButtonISR_Stop() {
%1 = tail call i32 (...) @ButtonISR_Disable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ aligned_alloc(unsigned long, unsigned long);
int /*<<< orphan*/ calloc(unsigned long, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ labs(long);
int /*<<< orphan*/ llabs(long long);
int /*<<< orphan*/ malloc(unsigned long);
int /*<<< orphan*/ realloc(void *, unsigned long);
void stdlib(void *p, void *q, long unsigned int sz) {
  abort();
  calloc(sz, 1);
  exit(1);
  free(p);
  labs(1L);
  llabs(1LL);
  malloc(sz);
  realloc(p, sz);
  aligned_alloc(sz, sz);
}


x86 assembly (clang, -O0):
<stdlib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<stdlib>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @stdlib(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @stdlib(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i32 (...) @abort()
unreachable
}
void enable_interrupts(void) { __asm__("sti"); }


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

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

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

LLVM IR (-O2):
define void @enable_interrupts() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void test_iniparser(void) {}


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

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

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

LLVM IR (-O2):
define void @test_iniparser() {
ret void
}
/* Variables and functions */
int e_inline_baz();
int bar(void) { return e_inline_baz(); }


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

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

LLVM IR (-O0):
define i32 @bar() {
%1 = call i32 (...) @e_inline_baz()
ret i32 %1
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 (...) @e_inline_baz()
ret i32 %1
}