xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xd7() {
  Assert_real((isprint(215) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              1080, ("isprint should be 0 for 0xd7"));
}


x86 assembly (clang, -O0):
<t_isprint_0xd7>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd7,%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x438,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0xd7>:
push   %rax
mov    $0xd7,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x438,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xd7\00"
define void @t_isprint_0xd7() {
%1 = call i64 @isprint(i32 215)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1080, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xd7\00"
define void @t_isprint_0xd7() {
%1 = tail call i64 @isprint(i32 215)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1080, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dsdotsub(int const *, float const *, int const *,
                            float const *, int const *, double *);
double c_dsdot(const int N, const float *X, const int strideX, const float *Y,
               const int strideY) {
  double dot;
  dsdotsub(&N, X, &strideX, Y, &strideY, &dot);
  return dot;
}


x86 assembly (clang, -O0):
<c_dsdot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x14(%rbp),%rdx
lea    -0x24(%rbp),%r8
lea    -0x30(%rbp),%r9
call   1030 <dsdotsub@plt>
movsd  -0x30(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_dsdot>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %edx,0x8(%rsp)
mov    %r8d,0x4(%rsp)
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%r8
lea    0x10(%rsp),%r9
call   1030 <dsdotsub@plt>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @c_dsdot(i32 %0, float* %1, i32 %2, float* %3, i32 %4) {
%6 = alloca i32
%7 = alloca float*
%8 = alloca i32
%9 = alloca float*
%10 = alloca i32
%11 = alloca double
store i32 %0, i32* %6
store float* %1, float** %7
store i32 %2, i32* %8
store float* %3, float** %9
store i32 %4, i32* %10
%12 = load float*, float** %7
%13 = load float*, float** %9
%14 = call i32 @dsdotsub(i32* %6, float* %12, i32* %8, float* %13, i32* %10, double* %11)
%15 = load double, double* %11
ret double %15
}

LLVM IR (-O2):
define double @c_dsdot(i32 %0, float* %1, i32 %2, float* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store i32 %0, i32* %6
store i32 %2, i32* %7
store i32 %4, i32* %8
%10 = bitcast double* %9 to i8*
%11 = call i32 @dsdotsub(i32* %6, float* %1, i32* %7, float* %3, i32* %8, double* %9)
%12 = load double, double* %9
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ echo();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ system(char *);
void cleanup_terminal_bcircle(void) {
  echo();
  system(
      "setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz  >/dev/null 2>&1");
  system("setterm -blank 10");
  endwin();
  system("clear");
}


x86 assembly (clang, -O0):
<cleanup_terminal_bcircle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <echo@plt>
lea    0xebe(%rip),%rdi
call   1040 <system@plt>
lea    0xef7(%rip),%rdi
call   1040 <system@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
lea    0xef6(%rip),%rdi
call   1040 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_terminal_bcircle>:
push   %rax
xor    %eax,%eax
call   1030 <echo@plt>
lea    0xec1(%rip),%rdi
call   1040 <system@plt>
lea    0xefa(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
lea    0xef9(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1\00"
@.str.1 = [18 x i8] c"setterm -blank 10\00"
@.str.2 = [6 x i8] c"clear\00"
define void @cleanup_terminal_bcircle() {
%1 = call i32 (...) @echo()
%2 = call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @endwin()
%5 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1\00"
@.str.1 = [18 x i8] c"setterm -blank 10\00"
@.str.2 = [6 x i8] c"clear\00"
define void @cleanup_terminal_bcircle() {
%1 = tail call i32 (...) @echo()
%2 = tail call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @endwin()
%5 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct AMCMemPool {
  int dummy;
};

/* Variables and functions */
long _memPool_IsEmpty_WithLock(struct AMCMemPool *);
long AMCMemPool_IsAllFree(struct AMCMemPool *pool) {
  return _memPool_IsEmpty_WithLock(pool);
}


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

x86 assembly (clang, -O2):
<AMCMemPool_IsAllFree>:
jmp    1030 <_memPool_IsEmpty_WithLock@plt>

LLVM IR (-O0):
%struct.AMCMemPool = type { i32 }
define i64 @AMCMemPool_IsAllFree(%struct.AMCMemPool* %0) {
%2 = alloca %struct.AMCMemPool*
store %struct.AMCMemPool* %0, %struct.AMCMemPool** %2
%3 = load %struct.AMCMemPool*, %struct.AMCMemPool** %2
%4 = call i64 @_memPool_IsEmpty_WithLock(%struct.AMCMemPool* %3)
ret i64 %4
}

LLVM IR (-O2):
%struct.AMCMemPool = type { i32 }
define i64 @AMCMemPool_IsAllFree(%struct.AMCMemPool* %0) {
%2 = tail call i64 @_memPool_IsEmpty_WithLock(%struct.AMCMemPool* %0)
ret i64 %2
}
/* Variables and functions */
char EOF;
char getchar();
void flushStdin() {
  char n;
  while ((n = getchar()) != EOF && n != '\n' && n != '\r') {
  };
}


x86 assembly (clang, -O0):
<flushStdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%ecx
mov    0x2ebc(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     115b <flushStdin+0x4b>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     115b <flushStdin+0x4b>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    116b <flushStdin+0x5b>
jmp    1170 <flushStdin+0x60>
jmp    1118 <flushStdin+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushStdin>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    (%rbx),%al
je     1133 <flushStdin+0x23>
cmp    $0xd,%al
je     1133 <flushStdin+0x23>
cmp    $0xa,%al
jne    1120 <flushStdin+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i8 0
define void @flushStdin() {
%1 = alloca i8
br label %2
2: ; preds = %18, %0
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = sext i8 %3 to i32
%5 = load i8, i8* @EOF
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %4, %6
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8, i8* %1
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 13
br label %16
16: ; preds = %12, %8, %2
%17 = phi i1 [ false, %8 ], [ false, %2 ], [ %15, %12 ]
br i1 %17, label %18, label %19
18: ; preds = %16
br label %2
19: ; preds = %16
ret void
}

LLVM IR (-O2):
@EOF = global i8 0
define void @flushStdin() {
br label %1
1: ; preds = %6, %0
%2 = tail call signext i8 (...) @getchar()
%3 = load i8, i8* @EOF
%4 = freeze i8 %3
%5 = icmp eq i8 %2, %4
br i1 %5, label %7, label %6
6: ; preds = %1
switch i8 %2, label %1 [
i8 13, label %7
i8 10, label %7
]
7: ; preds = %6, %6, %1
ret void
}
int isPrime(unsigned number) {
  int i;
  for (i = 2; i < number - 1; i++)
    if (number % i == 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jae    114f <isPrime+0x4f>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
cmp    $0x0,%edx
jne    113c <isPrime+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1156 <isPrime+0x56>
jmp    1141 <isPrime+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <isPrime+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPrime>:
mov    %edi,%r8d
lea    -0x1(%r8),%eax
cmp    $0x3,%eax
jb     1136 <isPrime+0x36>
mov    %r8d,%esi
neg    %esi
mov    $0x2,%edi
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %r8d,%eax
xor    %edx,%edx
div    %edi
test   %edx,%edx
je     113c <isPrime+0x3c>
add    $0x1,%edi
lea    (%rsi,%rdi,1),%eax
cmp    $0xffffffff,%eax
jne    1120 <isPrime+0x20>
mov    $0x1,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @isPrime(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ugt i32 %2, 2
br i1 %3, label %6, label %11
4: ; preds = %6
%5 = icmp eq i32 %10, %2
br i1 %5, label %11, label %6
6: ; preds = %1, %4
%7 = phi i32 [ %10, %4 ], [ 2, %1 ]
%8 = urem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add nuw i32 %7, 1
br i1 %9, label %11, label %4
11: ; preds = %6, %4, %1
%12 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *, char const *, int);
void missing(const char *msg, const char *file, int line) {
  printf("---> finish %s @ %s:%d <---\n", msg, file, line);
  exit(0);
}


x86 assembly (clang, -O0):
<missing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<missing>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"---> finish %s @ %s:%d <---\0A\00"
define void @missing(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i32 %9)
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [29 x i8] c"---> finish %s @ %s:%d <---\0A\00"
define void @missing(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%5 = tail call i32 @exit(i32 0)
unreachable
}
char **blkcpy(oav, bv)
char **oav;
register char **bv;
{
  register char **av = oav;
  while ((*av++ = *bv++) != '\0')
    continue;
  return (oav);
}


x86 assembly (clang, -O0):
<blkcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x8,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rax,(%rcx)
cmp    $0x0,%rax
je     1147 <blkcpy+0x47>
jmp    1114 <blkcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blkcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rsi,%rcx,1),%rdx
mov    %rdx,(%rax,%rcx,1)
add    $0x8,%rcx
test   %rdx,%rdx
jne    1110 <blkcpy+0x10>
ret

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

LLVM IR (-O2):
define i8** @blkcpy(i8** returned writeonly %0, i8** nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8** [ %1, %2 ], [ %6, %3 ]
%5 = phi i8** [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8*, i8** %4, i64 1
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8*, i8** %5, i64 1
store i8* %7, i8** %5
%9 = icmp eq i8* %7, null
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8** %0
}
/* Variables and functions */
int /*<<< orphan*/ Car_Get(int);
int Car_GetAcceleration(int /*<<< orphan*/);
int Car_GetCarAcceleration(int carnum) {
  return Car_GetAcceleration(Car_Get(carnum));
}


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

x86 assembly (clang, -O2):
<Car_GetCarAcceleration>:
push   %rax
call   1030 <Car_Get@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <Car_GetAcceleration@plt>

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

LLVM IR (-O2):
define i32 @Car_GetCarAcceleration(i32 %0) {
%2 = tail call i32 @Car_Get(i32 %0)
%3 = tail call i32 @Car_GetAcceleration(i32 %2)
ret i32 %3
}
int roi_set_safe(char *buff) {
  buff[0] = (131);
  return 1;
}


x86 assembly (clang, -O0):
<roi_set_safe>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x83,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roi_set_safe>:
movb   $0x83,(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @roi_set_safe(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 -125, i8* %4
ret i32 1
}

LLVM IR (-O2):
define i32 @roi_set_safe(i8* nocapture writeonly %0) {
store i8 -125, i8* %0
ret i32 1
}
int eraVersionMajor() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @eraVersionMajor() {
ret i32 1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xresizerequest_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xresizerequest.window;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xresizerequest_window>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xresizerequest_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xresizerequest_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int cairo_code_draw_lushGraphXBound_get_width() { return 8; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_lushGraphXBound_get_width() {
ret i32 8
}

LLVM IR (-O2):
define i32 @cairo_code_draw_lushGraphXBound_get_width() {
ret i32 8
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t HibernateIntStatus(bool bMasked) {
  if (bMasked == true) {
    return ((*((volatile uint32_t *)(0x400FC01C))));
  } else {
    return ((*((volatile uint32_t *)(0x400FC018))));
  }
}


x86 assembly (clang, -O0):
<HibernateIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1120 <HibernateIntStatus+0x20>
mov    $0x400fc01c,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    112a <HibernateIntStatus+0x2a>
mov    $0x400fc018,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateIntStatus>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
mov    0x400fc018(,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @HibernateIntStatus(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load volatile i32, i32* inttoptr (i64 1074774044 to i32*)
store i32 %7, i32* %2
br label %10
8: ; preds = %1
%9 = load volatile i32, i32* inttoptr (i64 1074774040 to i32*)
store i32 %9, i32* %2
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @HibernateIntStatus(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32* inttoptr (i64 1074774044 to i32*), i32* inttoptr (i64 1074774040 to i32*)
%4 = load volatile i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void mbed_sdk_init() { printf("", "07:28:10", "Mar 19 2022"); }


x86 assembly (clang, -O0):
<mbed_sdk_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
lea    0xede(%rip),%rsi
lea    0xee0(%rip),%rdx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbed_sdk_init>:
lea    0xef1(%rip),%rdi
lea    0xee2(%rip),%rsi
lea    0xee4(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [9 x i8] c"07:28:10\00"
@.str.2 = [12 x i8] c"Mar 19 2022\00"
define void @mbed_sdk_init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [9 x i8] c"07:28:10\00"
@.str.2 = [12 x i8] c"Mar 19 2022\00"
define void @mbed_sdk_init() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct fd_set {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __DARWIN_FD_CLR(int, struct fd_set *);
void qs_fd_clear(struct fd_set *set, int fd) { __DARWIN_FD_CLR(fd, set); }


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

x86 assembly (clang, -O2):
<qs_fd_clear>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <__DARWIN_FD_CLR@plt>

LLVM IR (-O0):
%struct.fd_set = type { i32 }
define void @qs_fd_clear(%struct.fd_set* %0, i32 %1) {
%3 = alloca %struct.fd_set*
%4 = alloca i32
store %struct.fd_set* %0, %struct.fd_set** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load %struct.fd_set*, %struct.fd_set** %3
%7 = call i32 @__DARWIN_FD_CLR(i32 %5, %struct.fd_set* %6)
ret void
}

LLVM IR (-O2):
%struct.fd_set = type { i32 }
define void @qs_fd_clear(%struct.fd_set* %0, i32 %1) {
%3 = tail call i32 @__DARWIN_FD_CLR(i32 %1, %struct.fd_set* %0)
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
scalar_t__ EXIT_SUCCESS;
scalar_t__ ft_putchar(char);
int ft_putnchar(char, size_t);
int ft_putncharl(char c, size_t n) {
  int ret;
  ret = ft_putnchar(c, n);
  ret = ft_putchar('\n') == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  return (ret);
}


x86 assembly (clang, -O0):
<ft_putncharl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <ft_putnchar@plt>
mov    %eax,-0x14(%rbp)
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
mov    0x2e83(%rip),%rcx
cmp    (%rcx),%rax
jne    1169 <ft_putncharl+0x49>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1175 <ft_putncharl+0x55>
mov    0x2e70(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putncharl>:
push   %rbx
call   1030 <ft_putnchar@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
je     1147 <ft_putncharl+0x27>
mov    0x2e9b(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putncharl(i8 signext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
%5 = alloca i32
store i8 %0, i8* %3
store i64 %1, i64* %4
%6 = load i8, i8* %3
%7 = load i64, i64* %4
%8 = call i32 @ft_putnchar(i8 signext %6, i64 %7)
store i32 %8, i32* %5
%9 = call i64 @ft_putchar(i8 signext 10)
%10 = load i64, i64* @EXIT_SUCCESS
%11 = icmp eq i64 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %5
br label %16
14: ; preds = %2
%15 = load i32, i32* @EXIT_FAILURE
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
store i32 %17, i32* %5
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putncharl(i8 signext %0, i64 %1) {
%3 = tail call i32 @ft_putnchar(i8 signext %0, i64 %1)
%4 = tail call i64 @ft_putchar(i8 signext 10)
%5 = load i64, i64* @EXIT_SUCCESS
%6 = icmp eq i64 %4, %5
%7 = load i32, i32* @EXIT_FAILURE
%8 = select i1 %6, i32 %3, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ wdctl_command(int);
void wdctl_show_trusted_local_maclist(void) { wdctl_command(34); }


x86 assembly (clang, -O0):
<wdctl_show_trusted_local_maclist>:
push   %rbp
mov    %rsp,%rbp
mov    $0x22,%edi
call   1030 <wdctl_command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wdctl_show_trusted_local_maclist>:
mov    $0x22,%edi
jmp    1030 <wdctl_command@plt>

LLVM IR (-O0):
define void @wdctl_show_trusted_local_maclist() {
%1 = call i32 @wdctl_command(i32 34)
ret void
}

LLVM IR (-O2):
define void @wdctl_show_trusted_local_maclist() {
%1 = tail call i32 @wdctl_command(i32 34)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_push(int /*<<< orphan*/);
void do_conts(void) { do_push(0); }


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

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

LLVM IR (-O0):
define void @do_conts() {
%1 = call i32 @do_push(i32 0)
ret void
}

LLVM IR (-O2):
define void @do_conts() {
%1 = tail call i32 @do_push(i32 0)
ret void
}
int int_non_neg(void *iptr) {
  int *i = iptr;
  return *i >= 0;
}


x86 assembly (clang, -O0):
<int_non_neg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_non_neg>:
mov    (%rdi),%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @int_non_neg(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = icmp sge i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @int_non_neg(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = lshr i32 %4, 31
ret i32 %5
}
/* Variables and functions */
size_t bits(size_t n) {
  size_t h = 0;
  while (n) {
    n >>= 1;
    h++;
  }
  return h;
}


x86 assembly (clang, -O0):
<bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <bits+0x38>
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <bits+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits>:
xor    %eax,%eax
test   %rdi,%rdi
je     1120 <bits+0x20>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
shr    %rcx
add    $0x1,%rax
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <bits+0x10>
ret

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

LLVM IR (-O2):
define i64 @bits(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i64 %5, 1
%7 = add nuw nsw i64 %4, 1
%8 = icmp ult i64 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %10
}
ceilFunction(float x) { return (int)(x + 1); }


x86 assembly (clang, -O0):
<ceilFunction>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceilFunction>:
addss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @ceilFunction(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 1.000000e+00
%5 = fptosi float %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ceilFunction(float %0) {
%2 = fadd float %0, 1.000000e+00
%3 = fptosi float %2 to i32
ret i32 %3
}
void swap(int *ar, int i, int j) {
  int temp = ar[i];
  ar[i] = ar[j];
  ar[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
unsigned int hash_direct_hash(const void *ptr) {
  return (unsigned int)(unsigned long)ptr;
}


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

x86 assembly (clang, -O2):
<hash_direct_hash>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i32 @hash_direct_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @hash_direct_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
int main() {
  int var = 1;
#pragma omp parallel
  if (var != 1)
    __builtin_abort();
#pragma omp task shared(var)
  var = 2;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1135 <main+0x25>
call   1030 <abort@plt>
movl   $0x2,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %0
unreachable
6: ; preds = %0
store i32 2, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void intel_acpi_device_id_update(struct drm_i915_private *i915) { return; }


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

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

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

LLVM IR (-O2):
%struct.drm_i915_private = type opaque
define void @intel_acpi_device_id_update(%struct.drm_i915_private* nocapture %0) {
ret void
}
/* Type definitions */
typedef int s;

/* Variables and functions */
int rand();
int random_move(int s) {
  int m;
  do {
    m = rand() % 9;
  } while ((((s)&0x1ff) & (1 << (m))
                ? 0x1
                : (((s) >> 9 & 0x1ff) & (1 << (m)) ? 0x2 : 0x0)));
  return m;
}


x86 assembly (clang, -O0):
<random_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1ff,%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1159 <random_move+0x49>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1181 <random_move+0x71>
mov    -0x4(%rbp),%edx
sar    $0x9,%edx
and    $0x1ff,%edx
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %eax,%edx
xor    %eax,%eax
mov    $0x2,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x0,%eax
jne    111b <random_move+0xb>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_move>:
push   %rbx
mov    %edi,%ebx
shr    $0x9,%ebx
or     %edi,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rcx
imul   $0x38e38e39,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rax
add    %edx,%eax
lea    (%rax,%rax,8),%eax
sub    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %ebx,%eax
test   $0x1ff,%eax
jne    1120 <random_move+0x10>
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random_move(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %25, %1
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 9
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = and i32 %8, 511
%10 = load i32, i32* %3
%11 = shl i32 1, %10
%12 = and i32 %9, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %7
br label %25
15: ; preds = %7
%16 = load i32, i32* %2
%17 = ashr i32 %16, 9
%18 = and i32 %17, 511
%19 = load i32, i32* %3
%20 = shl i32 1, %19
%21 = and i32 %18, %20
%22 = icmp ne i32 %21, 0
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 2, i32 0
br label %25
25: ; preds = %15, %14
%26 = phi i32 [ 1, %14 ], [ %24, %15 ]
%27 = icmp ne i32 %26, 0
br i1 %27, label %4, label %28
28: ; preds = %25
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @random_move(i32 %0) {
%2 = lshr i32 %0, 9
%3 = or i32 %2, %0
br label %4
4: ; preds = %4, %1
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 9
%7 = shl nuw nsw i32 1, %6
%8 = and i32 %7, 511
%9 = and i32 %8, %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
ret i32 %6
}
void glXWaitX(void) {}


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

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

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

LLVM IR (-O2):
define void @glXWaitX() {
ret void
}
float getpixel_0(float *x, int w, int h, int i, int j) {
  if (i < 0 || i >= w || j < 0 || j >= h)
    return 0;
  return x[i + j * w];
}


x86 assembly (clang, -O0):
<getpixel_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     1141 <getpixel_0+0x41>
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1141 <getpixel_0+0x41>
cmpl   $0x0,-0x20(%rbp)
jl     1141 <getpixel_0+0x41>
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     114e <getpixel_0+0x4e>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116b <getpixel_0+0x6b>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%edx
imul   -0x14(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpixel_0>:
xorps  %xmm0,%xmm0
test   %ecx,%ecx
js     1124 <getpixel_0+0x24>
cmp    %edx,%r8d
jge    1124 <getpixel_0+0x24>
cmp    %esi,%ecx
jge    1124 <getpixel_0+0x24>
test   %r8d,%r8d
js     1124 <getpixel_0+0x24>
imul   %esi,%r8d
add    %ecx,%r8d
movslq %r8d,%rax
movss  (%rdi,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @getpixel_0(float* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca float
%7 = alloca float*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store float* %0, float** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%12 = load i32, i32* %10
%13 = icmp slt i32 %12, 0
br i1 %13, label %25, label %14
14: ; preds = %5
%15 = load i32, i32* %10
%16 = load i32, i32* %8
%17 = icmp sge i32 %15, %16
br i1 %17, label %25, label %18
18: ; preds = %14
%19 = load i32, i32* %11
%20 = icmp slt i32 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %18
%22 = load i32, i32* %11
%23 = load i32, i32* %9
%24 = icmp sge i32 %22, %23
br i1 %24, label %25, label %26
25: ; preds = %21, %18, %14, %5
store float 0.000000e+00, float* %6
br label %36
26: ; preds = %21
%27 = load float*, float** %7
%28 = load i32, i32* %10
%29 = load i32, i32* %11
%30 = load i32, i32* %8
%31 = mul nsw i32 %29, %30
%32 = add nsw i32 %28, %31
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds float, float* %27, i64 %33
%35 = load float, float* %34
store float %35, float* %6
br label %36
36: ; preds = %26, %25
%37 = load float, float* %6
ret float %37
}

LLVM IR (-O2):
define float @getpixel_0(float* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp slt i32 %3, 0
br i1 %6, label %19, label %7
7: ; preds = %5
%8 = icmp slt i32 %3, %1
%9 = icmp sgt i32 %4, -1
%10 = and i1 %8, %9
%11 = icmp slt i32 %4, %2
%12 = and i1 %11, %10
br i1 %12, label %13, label %19
13: ; preds = %7
%14 = mul nsw i32 %4, %1
%15 = add nsw i32 %14, %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %0, i64 %16
%18 = load float, float* %17
br label %19
19: ; preds = %5, %7, %13
%20 = phi float [ %18, %13 ], [ 0.000000e+00, %7 ], [ 0.000000e+00, %5 ]
ret float %20
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int write(int, char const *, int /*<<< orphan*/);
int send_negotiation(int fd) {
  const char *negotiation = "\xFF\xFB\x01";
  return write(fd, negotiation, strlen(negotiation));
}


x86 assembly (clang, -O0):
<send_negotiation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_negotiation>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\FF\FB\01\00"
define i32 @send_negotiation(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32, i32* %2
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @write(i32 %4, i8* %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"\FF\FB\01\00"
define i32 @send_negotiation(i32 %0) {
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %3
}
int fltGt(const void *f1, const void *f2) {
  return (*((float *)f1) > *((float *)f2));
  ;
}


x86 assembly (clang, -O0):
<fltGt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fltGt>:
movss  (%rdi),%xmm0
xor    %eax,%eax
ucomiss (%rsi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @fltGt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to float*
%7 = load float, float* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = fcmp ogt float %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @fltGt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp ogt float %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void event_words(p, continuation) char *p;
int continuation;
{}


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

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

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

LLVM IR (-O2):
define void @event_words(i8* nocapture %0, i32 %1) {
ret void
}
int test_imm_6Dint64_midword_reg(long long val) {
  return ((val >> 16) & (0x6D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Dint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x6d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Dint64_midword_reg>:
test   $0x6d0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Dint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 109
%6 = icmp ne i64 %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_6Dint64_midword_reg(i64 %0) {
%2 = and i64 %0, 7143424
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int doAllFeatures();
int score_train(int loop) {
  if (loop == 0)
    return doAllFeatures();
  return 1;
}


x86 assembly (clang, -O0):
<score_train>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1134 <score_train+0x24>
mov    $0x0,%al
call   1030 <doAllFeatures@plt>
mov    %eax,-0x4(%rbp)
jmp    113b <score_train+0x2b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<score_train>:
test   %edi,%edi
je     111a <score_train+0xa>
mov    $0x1,%eax
ret
xor    %eax,%eax
jmp    1030 <doAllFeatures@plt>

LLVM IR (-O0):
define i32 @score_train(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @doAllFeatures()
store i32 %7, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @score_train(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @doAllFeatures()
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 1, %1 ]
ret i32 %6
}
void tegra_io_dpd_enable(struct tegra_io_dpd *hnd) {}


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

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

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

LLVM IR (-O2):
%struct.tegra_io_dpd = type opaque
define void @tegra_io_dpd_enable(%struct.tegra_io_dpd* nocapture %0) {
ret void
}
int kstrcmp(const char *str1, const char *str2) {
  int s1;
  int s2;
  do {
    s1 = *str1++;
    s2 = *str2++;
    if (s1 == 0)
      break;
  } while (s1 == s2);
  return (s1 < s2) ? -1 : (s1 > s2);
}


x86 assembly (clang, -O0):
<kstrcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1145 <kstrcmp+0x45>
jmp    1156 <kstrcmp+0x56>
jmp    114a <kstrcmp+0x4a>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
je     110c <kstrcmp+0xc>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    116f <kstrcmp+0x6f>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1180 <kstrcmp+0x80>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kstrcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
movzbl (%rsi,%rax,1),%edx
test   %cl,%cl
je     1124 <kstrcmp+0x24>
add    $0x1,%rax
cmp    %dl,%cl
je     1110 <kstrcmp+0x10>
xor    %esi,%esi
cmp    %dl,%cl
setg   %sil
mov    $0xffffffff,%eax
cmovge %esi,%eax
ret

LLVM IR (-O0):
define i32 @kstrcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %7
7: ; preds = %20, %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
store i32 %11, i32* %5
%12 = load i8*, i8** %4
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %4
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
store i32 %15, i32* %6
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %7
br label %24
19: ; preds = %7
br label %20
20: ; preds = %19
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = icmp eq i32 %21, %22
br i1 %23, label %7, label %24
24: ; preds = %20, %18
%25 = load i32, i32* %5
%26 = load i32, i32* %6
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %29
28: ; preds = %24
br label %34
29: ; preds = %24
%30 = load i32, i32* %5
%31 = load i32, i32* %6
%32 = icmp sgt i32 %30, %31
%33 = zext i1 %32 to i32
br label %34
34: ; preds = %29, %28
%35 = phi i32 [ -1, %28 ], [ %33, %29 ]
ret i32 %35
}

LLVM IR (-O2):
define i32 @kstrcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %9, %3 ]
%5 = phi i8* [ %0, %2 ], [ %10, %3 ]
%6 = load i8, i8* %5
%7 = load i8, i8* %4
%8 = icmp ne i8 %6, 0
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = icmp eq i8 %6, %7
%12 = select i1 %8, i1 %11, i1 false
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = icmp slt i8 %6, %7
%15 = icmp sgt i8 %6, %7
%16 = zext i1 %15 to i32
%17 = select i1 %14, i32 -1, i32 %16
ret i32 %17
}