xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printCharWithShift(char, int);
void printStringWithShift(char *s, int shift_speed) {
  while (*s) {
    printCharWithShift(*s, shift_speed);
    s++;
  }
}


x86 assembly (clang, -O0):
<printStringWithShift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <printStringWithShift+0x3e>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1030 <printCharWithShift@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111f <printStringWithShift+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printStringWithShift>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1145 <printStringWithShift+0x35>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <printCharWithShift@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <printStringWithShift+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @printStringWithShift(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = tail call i32 @printCharWithShift(i8 signext %6, i32 %1)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
char *get_strvar(char *);
char *get_strval(char *str) {
  if (str[0] == '$') {
    return get_strvar(str);
  } else {
    return str;
  }
}


x86 assembly (clang, -O0):
<get_strval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
jne    113e <get_strval+0x2e>
mov    -0x10(%rbp),%rdi
call   1030 <get_strvar@plt>
mov    %rax,-0x8(%rbp)
jmp    1146 <get_strval+0x36>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_strval>:
cmpb   $0x24,(%rdi)
jne    111a <get_strval+0xa>
jmp    1030 <get_strvar@plt>
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @get_strval(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 36
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @get_strvar(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ %0, %1 ]
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glGetLightfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/ *);
void GetLightfv(GLenum light, GLenum pname, GLfloat *params) {
  glGetLightfv(light, pname, params);
}


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

x86 assembly (clang, -O2):
<GetLightfv>:
jmp    1030 <glGetLightfv@plt>

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

LLVM IR (-O2):
define void @GetLightfv(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @glGetLightfv(i32 %0, i32 %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void unpack_str(char **source, char *destination, int n) {
  memcpy(destination, *source, sizeof(char) * n);
  destination[n] = '\0';
  *source += n;
}


x86 assembly (clang, -O0):
<unpack_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
movslq %edx,%rdx
add    %rdx,%rcx
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_str>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    (%rdi),%rsi
movslq %edx,%rbx
mov    %r15,%rdi
mov    %ebx,%edx
call   1030 <memcpy@plt>
movb   $0x0,(%r15,%rbx,1)
add    %rbx,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @unpack_str(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** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = mul i64 1, %11
%13 = trunc i64 %12 to i32
%14 = call i32 @memcpy(i8* %7, i8* %9, i32 %13)
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
store i8 0, i8* %18
%19 = load i32, i32* %6
%20 = load i8**, i8*** %4
%21 = load i8*, i8** %20
%22 = sext i32 %19 to i64
%23 = getelementptr inbounds i8, i8* %21, i64 %22
store i8* %23, i8** %20
ret void
}

LLVM IR (-O2):
define void @unpack_str(i8** nocapture %0, i8* %1, i32 %2) {
%4 = load i8*, i8** %0
%5 = sext i32 %2 to i64
%6 = tail call i32 @memcpy(i8* %1, i8* %4, i32 %2)
%7 = getelementptr inbounds i8, i8* %1, i64 %5
store i8 0, i8* %7
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 %5
store i8* %9, i8** %0
ret void
}
/* Variables and functions */
int getIntRandom(int);
void bootstrapSelect(int seqlength, int *selected) {
  int i, j;
  for (i = 0; i < seqlength; i++) {
    j = getIntRandom(seqlength);
    (selected[j])++;
  }
  return;
}


x86 assembly (clang, -O0):
<bootstrapSelect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115c <bootstrapSelect+0x4c>
mov    -0x4(%rbp),%edi
call   1030 <getIntRandom@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <bootstrapSelect+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bootstrapSelect>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1133 <bootstrapSelect+0x23>
mov    %rsi,%r14
mov    %edi,%ebx
mov    %edi,%ebp
nop
mov    %ebx,%edi
call   1030 <getIntRandom@plt>
cltq
addl   $0x1,(%r14,%rax,4)
add    $0xffffffff,%ebp
jne    1120 <bootstrapSelect+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @bootstrapSelect(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 0, %2 ]
%6 = tail call i32 @getIntRandom(i32 %0)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = add nuw nsw i32 %5, 1
%12 = icmp eq i32 %11, %0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
int bar(int *z) { return *z; }


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

x86 assembly (clang, -O2):
<bar>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int SMBReadBlock(int, int, unsigned char *);
int SMBWriteWord(int, int, int);
int readEepromBlock(unsigned char blockNr, unsigned char *buf) {
  int status, i;
  status = SMBWriteWord(0x16, 0x9, 0x4000 + (blockNr * 32));
  if (status < 0)
    return -1;
  status = SMBReadBlock(0x16, 0xC, buf);
  return status;
}


x86 assembly (clang, -O0):
<readEepromBlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x5(%rbp),%edx
shl    $0x5,%edx
add    $0x4000,%edx
mov    $0x16,%edi
mov    $0x9,%esi
call   1030 <SMBWriteWord@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1167 <readEepromBlock+0x47>
movl   $0xffffffff,-0x4(%rbp)
jmp    1183 <readEepromBlock+0x63>
mov    -0x10(%rbp),%rdx
mov    $0x16,%edi
mov    $0xc,%esi
call   1040 <SMBReadBlock@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readEepromBlock>:
push   %rbx
mov    %rsi,%rbx
shl    $0x5,%edi
lea    0x4000(%rdi),%edx
mov    $0x16,%edi
mov    $0x9,%esi
call   1030 <SMBWriteWord@plt>
test   %eax,%eax
js     1153 <readEepromBlock+0x33>
mov    $0x16,%edi
mov    $0xc,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <SMBReadBlock@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @readEepromBlock(i8 zeroext %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %4
store i8* %1, i8** %5
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = mul nsw i32 %9, 32
%11 = add nsw i32 16384, %10
%12 = call i32 @SMBWriteWord(i32 22, i32 9, i32 %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %20
16: ; preds = %2
%17 = load i8*, i8** %5
%18 = call i32 @SMBReadBlock(i32 22, i32 12, i8* %17)
store i32 %18, i32* %6
%19 = load i32, i32* %6
store i32 %19, i32* %3
br label %20
20: ; preds = %16, %15
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @readEepromBlock(i8 zeroext %0, i8* %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 5
%5 = or i32 %4, 16384
%6 = tail call i32 @SMBWriteWord(i32 22, i32 9, i32 %5)
%7 = icmp slt i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @SMBReadBlock(i32 22, i32 12, i8* %1)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ pthread_testcancel();
int __nosync_fsync() {
  pthread_testcancel();
  errno = 0;
  return 0;
}


x86 assembly (clang, -O0):
<__nosync_fsync>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pthread_testcancel@plt>
mov    0x2ebe(%rip),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__nosync_fsync>:
push   %rax
xor    %eax,%eax
call   1030 <pthread_testcancel@plt>
mov    0x2ec1(%rip),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
define i32 @__nosync_fsync() {
%1 = call i32 (...) @pthread_testcancel()
store i64 0, i64* @errno
ret i32 0
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @__nosync_fsync() {
%1 = tail call i32 (...) @pthread_testcancel()
store i64 0, i64* @errno
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int k;
  int j;
  int n;
  if (!(n >= 1 && k >= n && j == 0))
    return 0;
  while (j <= n - 1) {
    j++;
    k--;
  }
  assert(k >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     113f <main+0x2f>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     113f <main+0x2f>
cmpl   $0x0,-0xc(%rbp)
je     114b <main+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1190 <main+0x80>
jmp    1150 <main+0x40>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1178 <main+0x68>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <main+0x40>
cmpl   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%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
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 1
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %11, %7, %0
store i32 0, i32* %1
br label %31
15: ; preds = %11
br label %16
16: ; preds = %21, %15
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 1
%20 = icmp sle i32 %17, %19
br i1 %20, label %21, label %26
21: ; preds = %16
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
%24 = load i32, i32* %2
%25 = add nsw i32 %24, -1
store i32 %25, i32* %2
br label %16
26: ; preds = %16
%27 = load i32, i32* %2
%28 = icmp sge i32 %27, 0
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
store i32 0, i32* %1
br label %31
31: ; preds = %26, %14
%32 = load i32, i32* %1
ret i32 %32
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct itimerval {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, struct itimerval const *, struct itimerval *);
int setitimer(int which, const struct itimerval *restrict new,
              struct itimerval *restrict old) {
  return syscall(104, which, new, old);
}


x86 assembly (clang, -O0):
<setitimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x68,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setitimer>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x68,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.itimerval = type { i32 }
define i32 @setitimer(i32 %0, %struct.itimerval* noalias %1, %struct.itimerval* noalias %2) {
%4 = alloca i32
%5 = alloca %struct.itimerval*
%6 = alloca %struct.itimerval*
store i32 %0, i32* %4
store %struct.itimerval* %1, %struct.itimerval** %5
store %struct.itimerval* %2, %struct.itimerval** %6
%7 = load i32, i32* %4
%8 = load %struct.itimerval*, %struct.itimerval** %5
%9 = load %struct.itimerval*, %struct.itimerval** %6
%10 = call i32 @syscall(i32 104, i32 %7, %struct.itimerval* %8, %struct.itimerval* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.itimerval = type { i32 }
define i32 @setitimer(i32 %0, %struct.itimerval* noalias %1, %struct.itimerval* noalias %2) {
%4 = tail call i32 @syscall(i32 104, i32 %0, %struct.itimerval* %1, %struct.itimerval* %2)
ret i32 %4
}
void vector(int *a) {
  int i;
#pragma acc loop vector
  for (i = 0; i < 32; i++)
    a[i] -= a[i];
}


x86 assembly (clang, -O0):
<vector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1142 <vector+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
sub    %esi,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <vector+0xf>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @vector(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
int av_clip_c(int a, int amin, int amax) {
  if (a < amin)
    return amin;
  else if (a > amax)
    return amax;
  else
    return a;
}


x86 assembly (clang, -O0):
<av_clip_c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <av_clip_c+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <av_clip_c+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <av_clip_c+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <av_clip_c+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_clip_c>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @av_clip_c(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ drv_CW_send(char *, int);
int /*<<< orphan*/ usleep(int);
void drv_CW_clear(void) {
  drv_CW_send("\376X\375", 3);
  usleep(500000);
}


x86 assembly (clang, -O0):
<drv_CW_clear>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x3,%esi
call   1030 <drv_CW_send@plt>
mov    $0x7a120,%edi
call   1040 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_CW_clear>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x3,%esi
call   1030 <drv_CW_send@plt>
mov    $0x7a120,%edi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\FEX\FD\00"
define void @drv_CW_clear() {
%1 = call i32 @drv_CW_send(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = call i32 @usleep(i32 500000)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\FEX\FD\00"
define void @drv_CW_clear() {
%1 = tail call i32 @drv_CW_send(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%2 = tail call i32 @usleep(i32 500000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_error_too_much_garbage() {
  printf("Error: too much garbage declared, i can't take anymore!\n");
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"Error: too much garbage declared, i can't take anymore!\0A\00"
define void @msg_error_too_much_garbage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [56 x i8] c"Error: too much garbage declared, i can't take anymore!\00"
define void @msg_error_too_much_garbage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((returns_twice)) void t0(void) {}


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

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

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

LLVM IR (-O2):
define void @t0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rt_term();
void XeDisk_Quit(void) { rt_term(); }


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

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

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

LLVM IR (-O2):
define void @XeDisk_Quit() {
%1 = tail call i32 (...) @rt_term()
ret void
}
void updateSeriesTitle(unsigned int seriesID, char *title) { return; }


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

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

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

LLVM IR (-O2):
define void @updateSeriesTitle(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int count;
  printf("hello%n world\n", &count);
  printf("%d\n", count);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"hello%n world\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ exists(char *);
const char *scan_resume_reason() {
  if (exists(
          "/sys/class/i2c-adapter/i2c-0/0-0073/neo1973-resume.0/resume_reason"))
    return "/sys/class/i2c-adapter/i2c-0/0-0073/neo1973-resume.0/resume_reason";
  return NULL;
}


x86 assembly (clang, -O0):
<scan_resume_reason>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <exists@plt>
cmp    $0x0,%rax
je     113e <scan_resume_reason+0x2e>
lea    0xecb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1146 <scan_resume_reason+0x36>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_resume_reason>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <exists@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [67 x i8] c"/sys/class/i2c-adapter/i2c-0/0-0073/neo1973-resume.0/resume_reason\00"
define i8* @scan_resume_reason() {
%1 = alloca i8*
%2 = call i64 @exists(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8** %1
br label %6
5: ; preds = %0
store i8* null, i8** %1
br label %6
6: ; preds = %5, %4
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@.str = [67 x i8] c"/sys/class/i2c-adapter/i2c-0/0-0073/neo1973-resume.0/resume_reason\00"
define i8* @scan_resume_reason() {
%1 = tail call i64 @exists(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int tirar(int);
int d20() { return tirar(20); }


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

x86 assembly (clang, -O2):
<d20>:
mov    $0x14,%edi
jmp    1030 <tirar@plt>

LLVM IR (-O0):
define i32 @d20() {
%1 = call i32 @tirar(i32 20)
ret i32 %1
}

LLVM IR (-O2):
define i32 @d20() {
%1 = tail call i32 @tirar(i32 20)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int ENOSYS;
int pthread_sigmask(int how, const sigset_t *set, sigset_t *oldset) {
  return ENOSYS;
}


x86 assembly (clang, -O0):
<pthread_sigmask>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_sigmask>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_sigmask(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* @ENOSYS
ret i32 %7
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_sigmask(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
ret i32 %4
}
long long int gcd(long long int a, long long int b) {
  long long int max, min, rem;
  if (a >= b) {
    max = a;
    min = b;
  } else {
    max = b;
    min = a;
  }
  while (min != 0) {
    rem = max % min;
    max = min;
    min = rem;
  }
  return max;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jl     112f <gcd+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    113f <gcd+0x3f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1144 <gcd+0x44>
cmpq   $0x0,-0x20(%rbp)
je     1172 <gcd+0x72>
mov    -0x18(%rbp),%rax
cqto
idivq  -0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1144 <gcd+0x44>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rdi,%rax
cmp    %rsi,%rdi
mov    %rsi,%rdx
cmovl  %rdi,%rdx
cmovl  %rsi,%rax
test   %rdx,%rdx
jne    112d <gcd+0x2d>
ret
nopw   0x0(%rax,%rax,1)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1142 <gcd+0x42>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1120 <gcd+0x20>
xor    %edx,%edx
div    %ecx
jmp    1125 <gcd+0x25>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
%5 = select i1 %3, i64 %1, i64 %0
%6 = icmp eq i64 %4, 0
br i1 %6, label %12, label %7
7: ; preds = %2, %7
%8 = phi i64 [ %9, %7 ], [ %5, %2 ]
%9 = phi i64 [ %10, %7 ], [ %4, %2 ]
%10 = srem i64 %8, %9
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
%13 = phi i64 [ %5, %2 ], [ %9, %7 ]
ret i64 %13
}
int compare(const void *op1, const void *op2) {
  char l, r;
  l = *((char *)op1);
  r = *((char *)op2);
  return l - r;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x12(%rbp)
movsbl -0x11(%rbp),%eax
movsbl -0x12(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
store i8 %8, i8* %5
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
store i8 %10, i8* %6
%11 = load i8, i8* %5
%12 = sext i8 %11 to i32
%13 = load i8, i8* %6
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = sext i8 %3 to i32
%6 = sext i8 %4 to i32
%7 = sub nsw i32 %5, %6
ret i32 %7
}
long labs(long n) { return ((n < 0L) ? -n : n); }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int close(int /*<<< orphan*/ *);
int fclose(FILE *stream) {
  int error = close(stream);
  return error;
}


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

x86 assembly (clang, -O2):
<fclose>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @fclose(i32* %0) {
%2 = tail call i32 @close(i32* %0)
ret i32 %2
}
void f(float a) {}


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

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

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

LLVM IR (-O2):
define void @f(float %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void umem_free(void *ptr, size_t size) { free(ptr); }


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

x86 assembly (clang, -O2):
<umem_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @umem_free(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct stat {
  unsigned int st_mtime;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
unsigned int stat_mtime(const char *path) {
  struct stat s;
  if (stat(path, &s) == 0) {
    return s.st_mtime;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<stat_mtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    113e <stat_mtime+0x2e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <stat_mtime+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat_mtime>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1126 <stat_mtime+0x16>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @stat_mtime(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%10 = load i32, i32* %9
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @stat_mtime(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = select i1 %5, i32 %7, i32 0
ret i32 %8
}
void gtk_tree_view_get_vadjustment() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_vadjustment() {
ret void
}
/* Variables and functions */
double sqrt(double);
double calcSqrt(double d) { return sqrt(d); }


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

x86 assembly (clang, -O2):
<calcSqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <calcSqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @calcSqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void stop(void *S) {
  FILE *file = S;
  fclose(file);
}


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

x86 assembly (clang, -O2):
<stop>:
jmp    1030 <fclose@plt>

LLVM IR (-O0):
define void @stop(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 = call i32 @fclose(i32* %6)
ret void
}

LLVM IR (-O2):
define void @stop(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @fclose(i32* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ _doprnt_ansi(char const *, int /*<<< orphan*/,
                                int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int vfprintf(FILE *f, const char *fmt, va_list args) {
  _doprnt_ansi(fmt, args, f);
  return (ferror(f) ? EOF : 0);
}


x86 assembly (clang, -O0):
<vfprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rdx
call   1030 <_doprnt_ansi@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ferror@plt>
cmp    $0x0,%rax
je     1167 <vfprintf+0x47>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
jmp    1171 <vfprintf+0x51>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    1171 <vfprintf+0x51>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfprintf>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rbx,%rdx
call   1030 <_doprnt_ansi@plt>
mov    %rbx,%rdi
call   1040 <ferror@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     114c <vfprintf+0x2c>
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @vfprintf(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_doprnt_ansi(i8* %1, i32 %2, i32* %0)
%5 = tail call i64 @ferror(i32* %0)
%6 = icmp eq i64 %5, 0
%7 = load i32, i32* @EOF
%8 = select i1 %6, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ alloca(size_t);
void uninitvar_alloca(void) {
  size_t size;
  (void)alloca(size);
}


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

x86 assembly (clang, -O2):
<uninitvar_alloca>:
jmp    1030 <alloca@plt>

LLVM IR (-O0):
define void @uninitvar_alloca() {
%1 = alloca i64
%2 = load i64, i64* %1
%3 = call i32 @alloca(i64 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_alloca() {
%1 = tail call i32 @alloca(i64 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LBA_REG_WRITE(void *, int, int);
int apollo_util_init(void *phys_addr) {
  LBA_REG_WRITE(phys_addr, 0x0500, 0);
  LBA_REG_WRITE(phys_addr, 0x0508, 0x1);
  LBA_REG_WRITE(phys_addr, 0x0538, 0x3);
  return 0;
}


x86 assembly (clang, -O0):
<apollo_util_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x500,%esi
xor    %edx,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    -0x8(%rbp),%rdi
mov    $0x508,%esi
mov    $0x1,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    -0x8(%rbp),%rdi
mov    $0x538,%esi
mov    $0x3,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apollo_util_init>:
push   %rbx
mov    %rdi,%rbx
mov    $0x500,%esi
xor    %edx,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    %rbx,%rdi
mov    $0x508,%esi
mov    $0x1,%edx
call   1030 <LBA_REG_WRITE@plt>
mov    %rbx,%rdi
mov    $0x538,%esi
mov    $0x3,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @apollo_util_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @LBA_REG_WRITE(i8* %3, i32 1280, i32 0)
%5 = load i8*, i8** %2
%6 = call i32 @LBA_REG_WRITE(i8* %5, i32 1288, i32 1)
%7 = load i8*, i8** %2
%8 = call i32 @LBA_REG_WRITE(i8* %7, i32 1336, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @apollo_util_init(i8* %0) {
%2 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1280, i32 0)
%3 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1288, i32 1)
%4 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1336, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_initalizeTableFromArray();
int main(void) {
  printf("///////////////////////\n");
  printf("// SEPARATE CHAINING HASHING \n");
  printf("///////////////////////\n");
  test_initalizeTableFromArray();
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <test_initalizeTableFromArray@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee6(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <test_initalizeTableFromArray@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str.3 = [30 x i8] c"// SEPARATE CHAINING HASHING \00"
@str.4 = [24 x i8] c"///////////////////////\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 (...) @test_initalizeTableFromArray()
%5 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int openat(int, char const *, int);
int xopenat(int dirfd, const char *pathname, int flags) {
  int fd = openat(dirfd, pathname, flags);
  if (fd < 0) {
    ;
  }
  return fd;
}


x86 assembly (clang, -O0):
<xopenat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <openat@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1143 <xopenat+0x33>
jmp    1143 <xopenat+0x33>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xopenat>:
jmp    1030 <openat@plt>

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

LLVM IR (-O2):
define i32 @xopenat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @openat(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ core6_swap(char *, int);
void U_EMRPOLYGON16_swap(char *record, int torev) { core6_swap(record, torev); }


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

x86 assembly (clang, -O2):
<U_EMRPOLYGON16_swap>:
jmp    1030 <core6_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRPOLYGON16_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core6_swap(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int wint_t;

/* Variables and functions */
int isgraph(int);
int iswgraph(wint_t c) { return c <= 255 ? isgraph(c) : 0; }


x86 assembly (clang, -O0):
<iswgraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     1138 <iswgraph+0x28>
mov    -0x4(%rbp),%edi
call   1030 <isgraph@plt>
mov    %eax,-0x8(%rbp)
jmp    1142 <iswgraph+0x32>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <iswgraph+0x32>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswgraph>:
cmp    $0xff,%edi
jg     111d <iswgraph+0xd>
jmp    1030 <isgraph@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @iswgraph(i32 %0) {
%2 = icmp slt i32 %0, 256
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @isgraph(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}