xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int hash(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/ const *, size_t, int,
         int);
int sha3_224(uint8_t *out, size_t outlen, const uint8_t *in, size_t inlen) {
  if (outlen > (224 / 8)) {
    return -1;
  }
  return hash(out, outlen, in, inlen, 200 - (224 / 4), 0x01);
}


x86 assembly (clang, -O0):
<sha3_224>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x1c,-0x18(%rbp)
jbe    113f <sha3_224+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <sha3_224+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x90,%r8d
mov    $0x1,%r9d
call   1030 <hash@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha3_224>:
cmp    $0x1c,%rsi
jbe    111c <sha3_224+0xc>
mov    $0xffffffff,%eax
ret
mov    $0x90,%r8d
mov    $0x1,%r9d
jmp    1030 <hash@plt>

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

LLVM IR (-O2):
define i32 @sha3_224(i32* %0, i64 %1, i32* %2, i64 %3) {
%5 = icmp ugt i64 %1, 28
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @hash(i32* %0, i64 %1, i32* %2, i64 %3, i32 144, i32 1)
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ %7, %6 ], [ -1, %4 ]
ret i32 %9
}
void mr97311_stop0(struct usb_spca50x *pcam) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @mr97311_stop0(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(int /*<<< orphan*/);
int al_sisnum(const char *str) {
  if (!*str)
    return 0;
  while (*str)
    if (!isdigit(*str++))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<al_sisnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1135 <al_sisnum+0x25>
movl   $0x0,-0x4(%rbp)
jmp    117f <al_sisnum+0x6f>
jmp    113a <al_sisnum+0x2a>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1178 <al_sisnum+0x68>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1173 <al_sisnum+0x63>
movl   $0x0,-0x4(%rbp)
jmp    117f <al_sisnum+0x6f>
jmp    113a <al_sisnum+0x2a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<al_sisnum>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     112b <al_sisnum+0x2b>
add    $0x1,%rdi
nopl   0x0(%rax)
movsbl %cl,%ecx
add    $0xffffffd0,%ecx
cmp    $0xa,%ecx
jae    112b <al_sisnum+0x2b>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <al_sisnum+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @al_sisnum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %7
4: ; preds = %7
%5 = load i8, i8* %10
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %1, %4
%8 = phi i8* [ %10, %4 ], [ %0, %1 ]
%9 = phi i8 [ %5, %4 ], [ %2, %1 ]
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = sext i8 %9 to i32
%12 = add nsw i32 %11, -48
%13 = icmp ult i32 %12, 10
br i1 %13, label %4, label %14
14: ; preds = %7, %4, %1
%15 = phi i32 [ 0, %1 ], [ 0, %7 ], [ 1, %4 ]
ret i32 %15
}
int swap(a, l, r)
int *a, l, r;
{
  int i;
  i = a[l];
  a[l] = a[r];
  a[r] = i;
  return 0;
}


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)
xor    %eax,%eax
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)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @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 i32 0
}

LLVM IR (-O2):
define i32 @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 i32 0
}
/* Variables and functions */
scalar_t__ is_string(char const *);
size_t strlen(char const *);
size_t strlen2(const char *str) { return is_string(str) ? strlen(str) : 0; }


x86 assembly (clang, -O0):
<strlen2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_string@plt>
cmp    $0x0,%rax
je     1151 <strlen2+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
jmp    115c <strlen2+0x3c>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    115c <strlen2+0x3c>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen2>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_string@plt>
test   %rax,%rax
je     1137 <strlen2+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @strlen2(i8* %0) {
%2 = tail call i64 @is_string(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
br label %6
6: ; preds = %1, %4
%7 = phi i64 [ %5, %4 ], [ 0, %1 ]
ret i64 %7
}
void format_warn(msg, arg) char msg[], arg[];
{
  char warn_msg[2048];
  (void)sprintf(warn_msg, msg, arg);
  warn(warn_msg);
}


x86 assembly (clang, -O0):
<format_warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x810(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x810(%rbp),%rdi
mov    $0x0,%al
call   1030 <warn@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_warn>:
push   %rbx
sub    $0x800,%rsp
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <warn@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @format_warn(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [2048 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* %7, i8* %8)
%10 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @warn to i32 (i8*, ...)*)(i8* %10)
ret void
}

LLVM IR (-O2):
define void @format_warn(i8* nocapture %0, i8* %1) {
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) %0, i8* %1)
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @warn to i32 (i8*, ...)*)(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __inc_remove_counter();
int __rename(char const *, char const *);
int rename(const char *old, const char *new) {
  int res = __rename(old, new);
  if (res == 0)
    __inc_remove_counter();
  return res;
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__rename@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1151 <rename+0x31>
mov    $0x0,%al
call   1040 <__inc_remove_counter@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
push   %rbx
call   1030 <__rename@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1133 <rename+0x13>
xor    %eax,%eax
call   1040 <__inc_remove_counter@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rename(i8* %0, i8* %1) {
%3 = tail call i32 @__rename(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @__inc_remove_counter()
br label %7
7: ; preds = %5, %2
ret i32 %3
}
int xisspace(int c) { return c == ' ' || c == '\t' || c == '\r' || c == '\n'; }


x86 assembly (clang, -O0):
<xisspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <xisspace+0x3e>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <xisspace+0x3e>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <xisspace+0x3e>
cmpl   $0xa,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisspace>:
cmp    $0x20,%edi
ja     111d <xisspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002200,%rdx
bt     %rcx,%rdx
jae    111d <xisspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xa,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xisspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %14, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br i1 %7, label %14, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 13
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 10
br label %14
14: ; preds = %11, %8, %5, %1
%15 = phi i1 [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @xisspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 10
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int fibo2(int);
int fibo1(int n) {
  if (n < 1) {
    return 0;
  } else if (n == 1) {
    return 1;
  } else {
    return fibo2(n - 1) + fibo2(n - 2);
  }
}


x86 assembly (clang, -O0):
<fibo1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1131 <fibo1+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116a <fibo1+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1147 <fibo1+0x37>
movl   $0x1,-0x4(%rbp)
jmp    116a <fibo1+0x5a>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo2@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo2@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo1>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    113b <fibo1+0x2b>
mov    %edi,%ebx
mov    $0x1,%eax
cmp    $0x1,%edi
je     113d <fibo1+0x2d>
lea    -0x1(%rbx),%edi
call   1030 <fibo2@plt>
mov    %eax,%ebp
add    $0xfffffffe,%ebx
mov    %ebx,%edi
call   1030 <fibo2@plt>
add    %ebp,%eax
jmp    113d <fibo1+0x2d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibo1(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = icmp eq i32 %0, 1
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = add nsw i32 %0, -1
%7 = tail call i32 @fibo2(i32 %6)
%8 = add nsw i32 %0, -2
%9 = tail call i32 @fibo2(i32 %8)
%10 = add nsw i32 %9, %7
br label %11
11: ; preds = %3, %1, %5
%12 = phi i32 [ %10, %5 ], [ 0, %1 ], [ 1, %3 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ asctime(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ str_copy(char *, int /*<<< orphan*/, int);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void store_time(char *buf) {
  time_t now = time(0);
  str_copy(buf, asctime(localtime(&now)), 26);
  buf[strlen(buf) - 1] = '\0';
}


x86 assembly (clang, -O0):
<store_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1050 <asctime@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    $0x1a,%edx
call   1070 <str_copy@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_time>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1050 <asctime@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1a,%edx
call   1070 <str_copy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @store_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @time(i32 0)
store i32 %4, i32* %3
%5 = load i8*, i8** %2
%6 = call i32 @localtime(i32* %3)
%7 = call i32 @asctime(i32 %6)
%8 = call i32 @str_copy(i8* %5, i32 %7, i32 26)
%9 = load i8*, i8** %2
%10 = load i8*, i8** %2
%11 = call i32 @strlen(i8* %10)
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %9, i64 %13
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
define void @store_time(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32 0)
store i32 %4, i32* %2
%5 = call i32 @localtime(i32* %2)
%6 = call i32 @asctime(i32 %5)
%7 = call i32 @str_copy(i8* %0, i32 %6, i32 26)
%8 = call i32 @strlen(i8* %0)
%9 = add nsw i32 %8, -1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 0, i8* %11
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ timer_milliseconds_byte();
uint8_t timer_milliseconds_mark(void) { return timer_milliseconds_byte(); }


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

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

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

LLVM IR (-O2):
define i32 @timer_milliseconds_mark() {
%1 = tail call i32 (...) @timer_milliseconds_byte()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ aloja_espacio_e_incializa_matrices();
int /*<<< orphan*/ imprime_matrices();
int /*<<< orphan*/ imprime_matriz_resultado();
int /*<<< orphan*/ libera_espacio();
int /*<<< orphan*/ multiplica_matrices();
int main(void) {
  aloja_espacio_e_incializa_matrices();
  imprime_matrices();
  multiplica_matrices();
  imprime_matriz_resultado();
  libera_espacio();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <aloja_espacio_e_incializa_matrices@plt>
mov    $0x0,%al
call   1050 <imprime_matrices@plt>
mov    $0x0,%al
call   1070 <multiplica_matrices@plt>
mov    $0x0,%al
call   1040 <imprime_matriz_resultado@plt>
mov    $0x0,%al
call   1060 <libera_espacio@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <aloja_espacio_e_incializa_matrices@plt>
xor    %eax,%eax
call   1050 <imprime_matrices@plt>
xor    %eax,%eax
call   1070 <multiplica_matrices@plt>
xor    %eax,%eax
call   1040 <imprime_matriz_resultado@plt>
xor    %eax,%eax
call   1060 <libera_espacio@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @aloja_espacio_e_incializa_matrices()
%3 = call i32 (...) @imprime_matrices()
%4 = call i32 (...) @multiplica_matrices()
%5 = call i32 (...) @imprime_matriz_resultado()
%6 = call i32 (...) @libera_espacio()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @aloja_espacio_e_incializa_matrices()
%2 = tail call i32 (...) @imprime_matrices()
%3 = tail call i32 (...) @multiplica_matrices()
%4 = tail call i32 (...) @imprime_matriz_resultado()
%5 = tail call i32 (...) @libera_espacio()
ret i32 0
}
f(int x) {
  short buf[x];
  return sizeof buf;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
shl    $0x1,%rax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i16, i64 %6
store i64 %6, i64* %4
%9 = mul nuw i64 2, %6
%10 = trunc i64 %9 to i32
%11 = load i8*, i8** %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EOPNOTSUPP;
int /*<<< orphan*/ errno;
int fsetflags(const char *name, unsigned long flags) {
  errno = EOPNOTSUPP;
  return -1;
}


x86 assembly (clang, -O0):
<fsetflags>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsetflags>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @fsetflags(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i32, i32* @EOPNOTSUPP
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EOPNOTSUPP = global i32 0
@errno = global i32 0
define i32 @fsetflags(i8* nocapture readnone %0, i64 %1) {
%3 = load i32, i32* @EOPNOTSUPP
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void bury_int(uint8_t *buf, int i) { *(int *)buf = i; }


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

x86 assembly (clang, -O2):
<bury_int>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @bury_int(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
int str_diff(const char *a, const char *b) {
  const unsigned char *s = (const unsigned char *)a;
  const unsigned char *t = (const unsigned char *)b;
  int j;
  for (;;) {
    if ((j = (*s - *t)))
      break;
    if (!*t)
      break;
    ++s;
    ++t;
  }
  return j;
}


x86 assembly (clang, -O0):
<str_diff>:
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,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    -0x20(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
je     113d <str_diff+0x3d>
jmp    116c <str_diff+0x6c>
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
jne    114f <str_diff+0x4f>
jmp    116c <str_diff+0x6c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <str_diff+0x1c>
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_diff>:
movzbl (%rdi),%eax
movzbl (%rsi),%ecx
sub    %ecx,%eax
jne    1134 <str_diff+0x34>
test   %cl,%cl
je     1134 <str_diff+0x34>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%edx
sub    %edx,%eax
jne    1134 <str_diff+0x34>
add    $0x1,%rcx
test   %dl,%dl
jne    1120 <str_diff+0x20>
ret

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

LLVM IR (-O2):
define i32 @str_diff(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = sub nsw i32 %4, %6
%8 = icmp ne i32 %7, 0
%9 = icmp eq i8 %5, 0
%10 = select i1 %8, i1 true, i1 %9
br i1 %10, label %24, label %11
11: ; preds = %2, %11
%12 = phi i8* [ %14, %11 ], [ %0, %2 ]
%13 = phi i8* [ %15, %11 ], [ %1, %2 ]
%14 = getelementptr inbounds i8, i8* %12, i64 1
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = load i8, i8* %14
%17 = zext i8 %16 to i32
%18 = load i8, i8* %15
%19 = zext i8 %18 to i32
%20 = sub nsw i32 %17, %19
%21 = icmp ne i32 %20, 0
%22 = icmp eq i8 %18, 0
%23 = select i1 %21, i1 true, i1 %22
br i1 %23, label %24, label %11
24: ; preds = %11, %2
%25 = phi i32 [ %7, %2 ], [ %20, %11 ]
ret i32 %25
}
void ff_hevc_put_hevc_uni_epel_v16_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v16_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_load_601_rtcu();
void spr_read_601_rtcu(void *opaque, int sprn) { gen_op_load_601_rtcu(); }


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

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

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

LLVM IR (-O2):
define void @spr_read_601_rtcu(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @gen_op_load_601_rtcu()
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
__attribute__((always_)) uint64_t detexPack64A16(uint32_t a16) {
  return (uint64_t)a16 << 48;
}


x86 assembly (clang, -O0):
<detexPack64A16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x30,%ecx
shl    %cl,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @detexPack64A16(i64 %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ printf(char *);
void screen_end() {
  endwin();
  printf("Exiting...\n");
}


x86 assembly (clang, -O0):
<screen_end>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <endwin@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_end>:
push   %rax
xor    %eax,%eax
call   1040 <endwin@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Exiting...\0A\00"
define void @screen_end() {
%1 = call i32 (...) @endwin()
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Exiting...\00"
define void @screen_end() {
%1 = tail call i32 (...) @endwin()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
void sa_inject_init(void) {}


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

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

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

LLVM IR (-O2):
define void @sa_inject_init() {
ret void
}
int int_shifts_are_arithmetic() {
  int all_bit_1 = ~0;
  return all_bit_1 >> 1 == all_bit_1;
}


x86 assembly (clang, -O0):
<int_shifts_are_arithmetic>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @int_shifts_are_arithmetic() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = load i32, i32* %1
%3 = ashr i32 %2, 1
%4 = load i32, i32* %1
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @int_shifts_are_arithmetic() {
ret i32 1
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t bswap16(uint16_t x) { return (x << 8) | (x >> 8); }


x86 assembly (clang, -O0):
<bswap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap16>:
mov    %edi,%eax
shl    $0x8,%eax
sar    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @bswap16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @bswap16(i32 %0) {
%2 = shl i32 %0, 8
%3 = ashr i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void USBDMAChannelDisable(uint32_t ui32Base, uint32_t ui32Channel) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) &=
      ~0x00000001;
}


x86 assembly (clang, -O0):
<USBDMAChannelDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelDisable>:
movslq %edi,%rax
movslq %esi,%rcx
shl    $0x4,%rcx
andl   $0xfffffffe,0x204(%rax,%rcx,1)
fe
ret

LLVM IR (-O0):
define void @USBDMAChannelDisable(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 516
%7 = load i32, i32* %4
%8 = mul nsw i32 16, %7
%9 = add nsw i32 %6, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, -2
store volatile i32 %13, i32* %11
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelDisable(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 516
%4 = shl nsw i32 %1, 4
%5 = add nsw i32 %3, %4
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -2
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ awlval_del(void *);
void awlval_del_proxy(void *v) { awlval_del(v); }


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

x86 assembly (clang, -O2):
<awlval_del_proxy>:
jmp    1030 <awlval_del@plt>

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

LLVM IR (-O2):
define void @awlval_del_proxy(i8* %0) {
%2 = tail call i32 @awlval_del(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ one(int);
int main(int argc, char **argv) {
  one(2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
call   1030 <one@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @one(i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @one(i32 2)
ret i32 0
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int _ioctl(int, int, struct termios const *);
int tcsetattr(int fd, int opts, const struct termios *tp) {
  return _ioctl(fd, opts, tp);
}


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

x86 assembly (clang, -O2):
<tcsetattr>:
jmp    1030 <_ioctl@plt>

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

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @tcsetattr(i32 %0, i32 %1, %struct.termios* %2) {
%4 = tail call i32 @_ioctl(i32 %0, i32 %1, %struct.termios* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void quote_calc3_error(const char *s) { fprintf(stderr, "%s\n", s); }


x86 assembly (clang, -O0):
<quote_calc3_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quote_calc3_error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @quote_calc3_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @quote_calc3_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ system(char *);
void ExitWithStop(int erno) {
  system("pause");
  exit(erno);
}


x86 assembly (clang, -O0):
<ExitWithStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ExitWithStop>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <system@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"pause\00"
define void @ExitWithStop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
define void @ExitWithStop(i32 %0) {
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
__attribute__((always_)) int eal_time_factor(uint64_t *factor) {
  *factor = 1;
  return 0;
}


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

x86 assembly (clang, -O2):
<eal_time_factor>:
movl   $0x1,(%rdi)
xor    %eax,%eax
ret

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

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


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

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

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

LLVM IR (-O2):
define i32 @_lock_dummy() {
ret i32 0
}
extern int link(char *old, char *nw) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_help() {
  printf(
      "UDP bandwidth utility. Copyright @ 2016 Kewin Rausch\n"
      "This tool should be mainly used for network debugging functionalities.\n"
      "No rates are supported; it just try to go as the maximum as possible.\n"
      "\n"
      "Mandatory fields:\n"
      "    Server mode: udping <ip_address> <udp_port> --listen [options]\n"
      "    Client mode: udping <ip_address> <udp_port> [other]\n"
      "\n"
      "Other options:\n"
      "    --duration\n"
      "        For client, the overall duration of the whole "
      "experiment(default is\n"
      "        10 seconds).\n"
      "\n");
}


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

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

LLVM IR (-O0):
@.str = [466 x i8] c"UDP bandwidth utility. Copyright @ 2016 Kewin Rausch\0AThis tool should be mainly used for network debugging functionalities.\0ANo rates are supported; it just try to go as the maximum as possible.\0A\0AMandatory fields:\0A Server mode: udping <ip_address> <udp_port> --listen [options]\0A Client mode: udping <ip_address> <udp_port> [other]\0A\0AOther options:\0A --duration\0A For client, the overall duration of the whole experiment(default is\0A 10 seconds).\0A\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([466 x i8], [466 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [465 x i8] c"UDP bandwidth utility. Copyright @ 2016 Kewin Rausch\0AThis tool should be mainly used for network debugging functionalities.\0ANo rates are supported; it just try to go as the maximum as possible.\0A\0AMandatory fields:\0A Server mode: udping <ip_address> <udp_port> --listen [options]\0A Client mode: udping <ip_address> <udp_port> [other]\0A\0AOther options:\0A --duration\0A For client, the overall duration of the whole experiment(default is\0A 10 seconds).\0A\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([465 x i8], [465 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *_strstr_word(char const *, char const *, int, int, int /*<<< orphan*/);
char *strcasestr_word_prefix(const char *haystack, const char *needle) {
  return _strstr_word(haystack, needle, 1, 1, 0);
}


x86 assembly (clang, -O0):
<strcasestr_word_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%ecx
xor    %r8d,%r8d
mov    %ecx,%edx
call   1030 <_strstr_word@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasestr_word_prefix>:
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
jmp    1030 <_strstr_word@plt>

LLVM IR (-O0):
define i8* @strcasestr_word_prefix(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 = load i8*, i8** %4
%7 = call i8* @_strstr_word(i8* %5, i8* %6, i32 1, i32 1, i32 0)
ret i8* %7
}

LLVM IR (-O2):
define i8* @strcasestr_word_prefix(i8* %0, i8* %1) {
%3 = tail call i8* @_strstr_word(i8* %0, i8* %1, i32 1, i32 1, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void help(void) {
  fprintf(stderr, "Usage: i2cset [-f] [-y] [-m MASK] [-r] I2CBUS CHIP-ADDRESS "
                  "DATA-ADDRESS [VALUE] ... [MODE]\n"
                  "  I2CBUS is an integer or an I2C bus name\n"
                  "  ADDRESS is an integer (0x03 - 0x77)\n"
                  "  MODE is one of:\n"
                  "    c (byte, no value)\n"
                  "    b (byte data, default)\n"
                  "    w (word data)\n"
                  "    i (I2C block data)\n"
                  "    s (SMBus block data)\n"
                  "    Append p for SMBus PEC\n");
  exit(1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [333 x i8] c"Usage: i2cset [-f] [-y] [-m MASK] [-r] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]\0A I2CBUS is an integer or an I2C bus name\0A ADDRESS is an integer (0x03 - 0x77)\0A MODE is one of:\0A c (byte, no value)\0A b (byte data, default)\0A w (word data)\0A i (I2C block data)\0A s (SMBus block data)\0A Append p for SMBus PEC\0A\00"
define void @help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([333 x i8], [333 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [333 x i8] c"Usage: i2cset [-f] [-y] [-m MASK] [-r] I2CBUS CHIP-ADDRESS DATA-ADDRESS [VALUE] ... [MODE]\0A I2CBUS is an integer or an I2C bus name\0A ADDRESS is an integer (0x03 - 0x77)\0A MODE is one of:\0A c (byte, no value)\0A b (byte data, default)\0A w (word data)\0A i (I2C block data)\0A s (SMBus block data)\0A Append p for SMBus PEC\0A\00"
define void @help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([333 x i8], [333 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ const off_t;

/* Variables and functions */
int /*<<< orphan*/ fail_file();
scalar_t__ lseek(int const, scalar_t__ const, int const);
int /*<<< orphan*/ perror(char *);
off_t ulseek(int const fd, off_t const offset, int const whence) {
  off_t const w = lseek(fd, offset, whence);
  if (w == (off_t)-1) {
    perror("lseek");
    fail_file();
  }
  return w;
}


x86 assembly (clang, -O0):
<ulseek>:
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   1040 <lseek@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0xffffffffffffffff,-0x20(%rbp)
jne    1173 <ulseek+0x43>
lea    0xe99(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <fail_file@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulseek>:
push   %rbx
call   1040 <lseek@plt>
mov    %rax,%rbx
cmp    $0xffffffffffffffff,%rax
je     1144 <ulseek+0x14>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <fail_file@plt>
jmp    113f <ulseek+0xf>

LLVM IR (-O0):
@.str = [6 x i8] c"lseek\00"
define i64 @ulseek(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = call i64 @lseek(i32 %8, i64 %9, i32 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
%13 = icmp eq i64 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (...) @fail_file()
br label %17
17: ; preds = %14, %3
%18 = load i64, i64* %7
ret i64 %18
}

LLVM IR (-O2):
@.str = [6 x i8] c"lseek\00"
define i64 @ulseek(i32 %0, i64 %1, i32 %2) {
%4 = tail call i64 @lseek(i32 %0, i64 %1, i32 %2)
%5 = icmp eq i64 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @fail_file()
br label %9
9: ; preds = %6, %3
ret i64 %4
}