xunge/DecIR huggingface dataset:
int sgn(int num) {
  if (num < 0) {
    return -1;
  } else if (num > 0) {
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <sgn+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    113a <sgn+0x3a>
cmpl   $0x0,-0x8(%rbp)
jle    1133 <sgn+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <sgn+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
xor    %ecx,%ecx
test   %edi,%edi
setne  %cl
mov    $0xffffffff,%eax
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @sgn(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
%4 = icmp sgt i32 %0, -1
%5 = select i1 %4, i32 %3, i32 -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/, int /*<<< orphan*/, double);
int main() {
  foo(0, 0, 0.0);
  foo(0, 0, 0.0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 0, i32 0, double 0.000000e+00)
%3 = call i32 @foo(i32 0, i32 0, double 0.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0, i32 0, double 0.000000e+00)
%2 = tail call i32 @foo(i32 0, i32 0, double 0.000000e+00)
ret i32 0
}
int atoi(const char *s) {
  int i;
  int n = 0;
  for (i = 0; s[i] >= '0' && s[i] <= '9'; i++)
    n = 10 * n + (s[i] - '0');
  return n;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x11(%rbp)
jl     1145 <atoi+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1155 <atoi+0x55>
jmp    117b <atoi+0x7b>
imul   $0xa,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <atoi+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %18
5: ; preds = %1, %5
%6 = phi i64 [ %13, %5 ], [ 0, %1 ]
%7 = phi i8 [ %15, %5 ], [ %2, %1 ]
%8 = phi i32 [ %12, %5 ], [ 0, %1 ]
%9 = zext i8 %7 to i32
%10 = mul nsw i32 %8, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = add nuw nsw i64 %6, 1
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = add i8 %15, -48
%17 = icmp ult i8 %16, 10
br i1 %17, label %5, label %18
18: ; preds = %5, %1
%19 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ fb_write(int);
int fb_write_string(const char *data) {
  int rv = 0;
  while (*data) {
    fb_write((int)(*data++));
    ++rv;
  }
  return rv;
}


x86 assembly (clang, -O0):
<fb_write_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1155 <fb_write_string+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <fb_write@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <fb_write_string+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_write_string>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1138 <fb_write_string+0x28>
mov    %rdi,%r14
xor    %ebx,%ebx
nop
movsbl %al,%edi
call   1030 <fb_write@plt>
movzbl 0x1(%r14,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <fb_write_string+0x10>
jmp    113a <fb_write_string+0x2a>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @fb_write_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %5 to i32
%10 = tail call i32 @fb_write(i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int c_restore() { return fputs("[u", stdout); }


x86 assembly (clang, -O0):
<c_restore>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_restore>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[u\00"
@stdout = global i32 0
define i32 @c_restore() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[u\00"
@stdout = global i32 0
define i32 @c_restore() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *std_memcpy(void *dst, const void *src, size_t n) {
  return memcpy(dst, src, n);
}


x86 assembly (clang, -O0):
<std_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    %rdi,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_memcpy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @std_memcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @std_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
unsigned short test_func_05(unsigned short a) {
  return __builtin_bswap32(a) >> 16;
}


x86 assembly (clang, -O0):
<test_func_05>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
bswap  %eax
shr    $0x10,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_05>:
mov    %edi,%eax
bswap  %eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define zeroext i16 @test_func_05(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = call i32 @llvm.bswap.i32(i32 %4)
%6 = lshr i32 %5, 16
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @test_func_05(i16 zeroext %0) {
%2 = zext i16 %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = lshr exact i32 %3, 16
%5 = trunc i32 %4 to i16
ret i16 %5
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *string_copy(char *s) {
  char *new;
  if (s == NULL)
    return NULL;
  new = (char *)malloc(strlen(s) + 1);
  strcpy(new, s);
  return new;
}


x86 assembly (clang, -O0):
<string_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <string_copy+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1182 <string_copy+0x52>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_copy>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115a <string_copy+0x2a>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115d <string_copy+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @string_copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %18
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = load i8*, i8** %3
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
store i8* %17, i8** %2
br label %18
18: ; preds = %8, %7
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @string_copy(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i64 @malloc(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %9
9: ; preds = %1, %3
%10 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int const AES_ENCRYPT;
int /*<<< orphan*/ AES_decrypt(unsigned char const *, unsigned char *,
                               int /*<<< orphan*/ const *);
int /*<<< orphan*/ AES_encrypt(unsigned char const *, unsigned char *,
                               int /*<<< orphan*/ const *);
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
                     const AES_KEY *key, const int enc) {
  if (AES_ENCRYPT == enc)
    AES_encrypt(in, out, key);
  else
    AES_decrypt(in, out, key);
}


x86 assembly (clang, -O0):
<AES_ecb_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
cmp    -0x1c(%rbp),%eax
jne    115f <AES_ecb_encrypt+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <AES_encrypt@plt>
jmp    1170 <AES_ecb_encrypt+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <AES_decrypt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AES_ecb_encrypt>:
test   %ecx,%ecx
je     1129 <AES_ecb_encrypt+0x9>
jmp    1040 <AES_decrypt@plt>
jmp    1030 <AES_encrypt@plt>

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

LLVM IR (-O2):
@AES_ENCRYPT = constant i32 0
define void @AES_ecb_encrypt(i8* %0, i8* %1, i32* %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @AES_encrypt(i8* %0, i8* %1, i32* %2)
br label %10
8: ; preds = %4
%9 = tail call i32 @AES_decrypt(i8* %0, i8* %1, i32* %2)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponse_ContentDirectory_GetSearchCapabilities(void *,
                                                                       char *);
int /*<<< orphan*/ printf(char *);
void UpnpContentDirectory_GetSearchCapabilities(void *upnptoken) {
  printf("Invoke: UpnpContentDirectory_GetSearchCapabilities();\r\n");
  UpnpResponse_ContentDirectory_GetSearchCapabilities(upnptoken,
                                                      "Sample String");
}


x86 assembly (clang, -O0):
<UpnpContentDirectory_GetSearchCapabilities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef5(%rip),%rsi
call   1030 <UpnpResponse_ContentDirectory_GetSearchCapabilities@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpContentDirectory_GetSearchCapabilities>:
push   %rbx
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
call   1040 <puts@plt>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UpnpResponse_ContentDirectory_GetSearchCapabilities@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Invoke: UpnpContentDirectory_GetSearchCapabilities();\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpContentDirectory_GetSearchCapabilities(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_ContentDirectory_GetSearchCapabilities(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sample String\00"
@str = [55 x i8] c"Invoke: UpnpContentDirectory_GetSearchCapabilities();\0D\00"
define void @UpnpContentDirectory_GetSearchCapabilities(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_ContentDirectory_GetSearchCapabilities(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ eeprom_read_dword(scalar_t__ *);
int /*<<< orphan*/ eeprom_write_dword(scalar_t__ *, scalar_t__);
void eeprom_update_dword(uint32_t *addr, uint32_t value) {
  uint32_t orig = eeprom_read_dword(addr);
  if (orig != value) {
    eeprom_write_dword(addr, value);
  }
}


x86 assembly (clang, -O0):
<eeprom_update_dword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <eeprom_read_dword@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1158 <eeprom_update_dword+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <eeprom_write_dword@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeprom_update_dword>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <eeprom_read_dword@plt>
cmp    %r14,%rax
jne    113c <eeprom_update_dword+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <eeprom_write_dword@plt>

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

LLVM IR (-O2):
define void @eeprom_update_dword(i64* %0, i64 %1) {
%3 = tail call i64 @eeprom_read_dword(i64* %0)
%4 = icmp eq i64 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @eeprom_write_dword(i64* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ reverse(char *, char *);
int /*<<< orphan*/ toHexChar(int);
char *put_x(char *p, uint64_t v) {
  char *base = p;
  do {
    *p++ = toHexChar(v % 16);
  } while ((v /= 16) != 0);
  reverse(base, p);
  return p;
}


x86 assembly (clang, -O0):
<put_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1040 <toHexChar@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jne    1137 <put_x+0x17>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <reverse@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_x>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rdi,%rbx
nopl   (%rax)
lea    0xf(%rsi),%r15d
test   %esi,%esi
mov    %esi,%ebp
cmovs  %r15d,%ebp
mov    %ebp,%eax
and    $0xfffffff0,%eax
sub    %eax,%esi
mov    %esi,%edi
call   1040 <toHexChar@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
sar    $0x4,%ebp
mov    %ebp,%esi
cmp    $0x1e,%r15d
ja     1130 <put_x+0x10>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <reverse@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @put_x(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %10, %3 ]
%5 = phi i8* [ %0, %2 ], [ %9, %3 ]
%6 = srem i32 %4, 16
%7 = tail call i32 @toHexChar(i32 %6)
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %8, i8* %5
%10 = sdiv i32 %4, 16
%11 = add i32 %4, 15
%12 = icmp ult i32 %11, 31
br i1 %12, label %13, label %3
13: ; preds = %3
%14 = tail call i32 @reverse(i8* %0, i8* %9)
ret i8* %9
}
int isOddNumber(int value) {
  if (value % 2 == 0) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isOddNumber>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <isOddNumber+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <isOddNumber+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @isOddNumber(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
void RTPathExecDir(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathExecDir() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int sumFooShared(int, int);
int main(int argc, char *argv[]) {
  int output = 0;
  output = sumFooShared(4, 4);
  printf("Sum is: %d\n", output);
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Sum is: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 @sumFooShared(i32 4, i32 4)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@.str = [12 x i8] c"Sum is: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sumFooShared(i32 4, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_avg1_8(int, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ const *, int, int);
void MC_avg_o_8_3dnow(uint8_t *dest, const uint8_t *ref, int stride,
                      int height) {
  MC_avg1_8(height, dest, ref, stride, 1);
}


x86 assembly (clang, -O0):
<MC_avg_o_8_3dnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%r8d
call   1030 <MC_avg1_8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_avg_o_8_3dnow>:
mov    %edx,%eax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %ecx,%edi
mov    %eax,%ecx
mov    $0x1,%r8d
jmp    1030 <MC_avg1_8@plt>

LLVM IR (-O0):
define void @MC_avg_o_8_3dnow(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = call i32 @MC_avg1_8(i32 %9, i32* %10, i32* %11, i32 %12, i32 1)
ret void
}

LLVM IR (-O2):
define void @MC_avg_o_8_3dnow(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_avg1_8(i32 %3, i32* %0, i32* %1, i32 %2, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __le32_to_cpu(int /*<<< orphan*/ const);
uint32_t get32_le(const uint32_t *p) { return __le32_to_cpu(*p); }


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

x86 assembly (clang, -O2):
<get32_le>:
mov    (%rdi),%edi
jmp    1030 <__le32_to_cpu@plt>

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

LLVM IR (-O2):
define i32 @get32_le(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__le32_to_cpu(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ yogrt_set_debug(int);
int iyogrt_set_debug_(int *val) {
  yogrt_set_debug(*val);
  return *val;
}


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

x86 assembly (clang, -O2):
<iyogrt_set_debug_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <yogrt_set_debug@plt>
mov    (%rbx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @iyogrt_set_debug_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @yogrt_set_debug(i32 %2)
%4 = load i32, i32* %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  int shuzi = 3, jiage = 30;
  printf("ticket %d\n", shuzi * jiage);
  printf("%d X %d = %d\n", shuzi, jiage, shuzi * jiage);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x1e,-0xc(%rbp)
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
lea    0xeb5(%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
mov    $0x5a,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x3,%esi
mov    $0x1e,%edx
mov    $0x5a,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"ticket %d\0A\00"
@.str.1 = [14 x i8] c"%d X %d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 90)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 30, i32 90)
ret i32 0
}
/* Variables and functions */
int __libc_fdatasync(int);
int /*<<< orphan*/ pthread_testcancel();
int fdatasync(int fd) {
  pthread_testcancel();
  return __libc_fdatasync(fd);
}


x86 assembly (clang, -O0):
<fdatasync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <pthread_testcancel@plt>
mov    -0x4(%rbp),%edi
call   1030 <__libc_fdatasync@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdatasync>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <pthread_testcancel@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <__libc_fdatasync@plt>

LLVM IR (-O0):
define i32 @fdatasync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @pthread_testcancel()
%4 = load i32, i32* %2
%5 = call i32 @__libc_fdatasync(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @fdatasync(i32 %0) {
%2 = tail call i32 (...) @pthread_testcancel()
%3 = tail call i32 @__libc_fdatasync(i32 %0)
ret i32 %3
}
/* Variables and functions */
unsigned char galois_mult_by_two(unsigned char);
unsigned char galois_mult_by_nine(unsigned char val) {
  return galois_mult_by_two(galois_mult_by_two(galois_mult_by_two(val))) ^ val;
}


x86 assembly (clang, -O0):
<galois_mult_by_nine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%eax
movzbl -0x1(%rbp),%ecx
xor    %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<galois_mult_by_nine>:
push   %rbx
mov    %edi,%ebx
call   1030 <galois_mult_by_two@plt>
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
movzbl %al,%edi
call   1030 <galois_mult_by_two@plt>
xor    %bl,%al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @galois_mult_by_nine(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call zeroext i8 @galois_mult_by_two(i8 zeroext %3)
%5 = call zeroext i8 @galois_mult_by_two(i8 zeroext %4)
%6 = call zeroext i8 @galois_mult_by_two(i8 zeroext %5)
%7 = zext i8 %6 to i32
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = xor i32 %7, %9
%11 = trunc i32 %10 to i8
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @galois_mult_by_nine(i8 zeroext %0) {
%2 = tail call zeroext i8 @galois_mult_by_two(i8 zeroext %0)
%3 = tail call zeroext i8 @galois_mult_by_two(i8 zeroext %2)
%4 = tail call zeroext i8 @galois_mult_by_two(i8 zeroext %3)
%5 = xor i8 %4, %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ gen_rand32();
double to_real2(int /*<<< orphan*/);
double genrand_real2(void) { return to_real2(gen_rand32()); }


x86 assembly (clang, -O0):
<genrand_real2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <gen_rand32@plt>
mov    %eax,%edi
call   1030 <to_real2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_real2>:
push   %rax
xor    %eax,%eax
call   1040 <gen_rand32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <to_real2@plt>

LLVM IR (-O0):
define double @genrand_real2() {
%1 = call i32 (...) @gen_rand32()
%2 = call double @to_real2(i32 %1)
ret double %2
}

LLVM IR (-O2):
define double @genrand_real2() {
%1 = tail call i32 (...) @gen_rand32()
%2 = tail call double @to_real2(i32 %1)
ret double %2
}
void enable_flap_detection_routines(void) {}


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

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

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

LLVM IR (-O2):
define void @enable_flap_detection_routines() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ acc_copyin(int *, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int i;
#pragma acc data present_or_copy(i)
  {
    fprintf(stderr, "CheCKpOInT\n");
    acc_copyin(&i, sizeof i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
call   1030 <acc_copyin@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <acc_copyin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @acc_copyin(i32* %6, i32 4)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @acc_copyin(i32* %3, i32 4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t read8be(uint8_t *src) { return *src; }


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

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

LLVM IR (-O0):
define i32 @read8be(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 @read8be(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int is_in_string_array(char **, size_t, char const *);
int is_in_string_array_os(char *array[], size_t len, const char item[]) {
  return is_in_string_array(array, len, item);
}


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

x86 assembly (clang, -O2):
<is_in_string_array_os>:
jmp    1030 <is_in_string_array@plt>

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

LLVM IR (-O2):
define i32 @is_in_string_array_os(i8** %0, i64 %1, i8* %2) {
%4 = tail call i32 @is_in_string_array(i8** %0, i64 %1, i8* %2)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
char to_lower(char character) {
  if ((character >= 'A') && (character <= 'Z')) {
    return (char)((uint8_t)character - (uint8_t)('A' - 'a'));
  } else {
    return character;
  }
}


x86 assembly (clang, -O0):
<to_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1135 <to_lower+0x35>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1135 <to_lower+0x35>
movsbq -0x2(%rbp),%rax
sub    $0xffffffffffffffe0,%rax
mov    %al,-0x1(%rbp)
jmp    113b <to_lower+0x3b>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @to_lower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Intro() {
  printf("\nProgrammer:\t\t Sam N.");
  printf("\nProgramming Assignment:\t 3");
  printf("\nDue Date:\t\t March 29, 2015");
  printf("\nProgram Description:\t The program will calculate the amount "
         "of\n\t\t\t property taxes owed.\n\n");
  return;
}


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

x86 assembly (clang, -O2):
<Intro>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
call   1040 <printf@plt>
lea    0xef2(%rip),%rdi
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"\0AProgrammer:\09\09 Sam N.\00"
@.str.1 = [28 x i8] c"\0AProgramming Assignment:\09 3\00"
@.str.2 = [28 x i8] c"\0ADue Date:\09\09 March 29, 2015\00"
@.str.3 = [91 x i8] c"\0AProgram Description:\09 The program will calculate the amount of\0A\09\09\09 property taxes owed.\0A\0A\00"
define void @Intro() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0AProgrammer:\09\09 Sam N.\00"
@.str.1 = [28 x i8] c"\0AProgramming Assignment:\09 3\00"
@.str.2 = [28 x i8] c"\0ADue Date:\09\09 March 29, 2015\00"
@str = [90 x i8] c"\0AProgram Description:\09 The program will calculate the amount of\0A\09\09\09 property taxes owed.\0A\00"
define void @Intro() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ cli_hexdump(int /*<<< orphan*/ *, int);
void nessie_print_block(uint8_t *block, uint16_t blocksize_bit) {
  cli_hexdump(block, (blocksize_bit + 7) / 8);
}


x86 assembly (clang, -O0):
<nessie_print_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <cli_hexdump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nessie_print_block>:
lea    0x7(%rsi),%eax
add    $0xe,%esi
test   %eax,%eax
cmovns %eax,%esi
sar    $0x3,%esi
jmp    1030 <cli_hexdump@plt>

LLVM IR (-O0):
define void @nessie_print_block(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 7
%8 = sdiv i32 %7, 8
%9 = call i32 @cli_hexdump(i32* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @nessie_print_block(i32* %0, i32 %1) {
%3 = add nsw i32 %1, 7
%4 = sdiv i32 %3, 8
%5 = tail call i32 @cli_hexdump(i32* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
long double foo(long double);
int main() {
  long double v = foo(10.0L) - 20.0L;
  if (v > 1.0e-5L || v < -1.0e-5L)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %rsp,%rax
flds   0xec8(%rip)
fstpt  (%rax)
call   1040 <foo@plt>
flds   0xebf(%rip)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldt   0xebd(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
ja     117c <main+0x5c>
jmp    1164 <main+0x44>
fldt   -0x20(%rbp)
fldt   0xeb3(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1183 <main+0x63>
jmp    117c <main+0x5c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
flds   0xed6(%rip)
fstpt  (%rsp)
call   1040 <foo@plt>
fadds  0xecc(%rip)
fldt   0xed2(%rip)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
ja     115d <main+0x3d>
fldt   0xed4(%rip)
fucomip %st(1),%st
fstp   %st(0)
fldz
ja     115d <main+0x3d>
fstp   %st(0)
xor    %eax,%eax
add    $0x18,%rsp
ret
fstp   %st(0)
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca x86_fp80
store i32 0, i32* %1
%3 = call x86_fp80 @foo(x86_fp80 0xK4002A000000000000000)
%4 = fsub x86_fp80 %3, 0xK4003A000000000000000
store x86_fp80 %4, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
%6 = fcmp ogt x86_fp80 %5, 0xK3FEEA7C5AC471B478423
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load x86_fp80, x86_fp80* %2
%9 = fcmp olt x86_fp80 %8, 0xKBFEEA7C5AC471B478423
br i1 %9, label %10, label %12
10: ; preds = %7, %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call x86_fp80 @foo(x86_fp80 0xK4002A000000000000000)
%2 = fadd x86_fp80 %1, 0xKC003A000000000000000
%3 = fcmp ogt x86_fp80 %2, 0xK3FEEA7C5AC471B478423
%4 = fcmp olt x86_fp80 %2, 0xKBFEEA7C5AC471B478423
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
const char *hello(void) { return "hello"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i8* @hello() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i8* @hello() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
int ld_ge_mr2(long double *a1, long double a2) { return !(((*a1) >= (a2))); }


x86 assembly (clang, -O0):
<ld_ge_mr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ge_mr2>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

LLVM IR (-O0):
define i32 @ld_ge_mr2(x86_fp80* %0, x86_fp80 %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80
store x86_fp80* %0, x86_fp80** %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80, x86_fp80* %4
%8 = fcmp oge x86_fp80 %6, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_ge_mr2(x86_fp80* nocapture %0, x86_fp80 %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = fcmp ult x86_fp80 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
void uper_c_source_h_encode_inner(struct encoder_t *encoder_p,
                                  const struct uper_c_source_h_t *src_p) {
  (void)encoder_p;
  (void)src_p;
}


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

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

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

LLVM IR (-O2):
%struct.encoder_t = type opaque
%struct.uper_c_source_h_t = type opaque
define void @uper_c_source_h_encode_inner(%struct.encoder_t* nocapture %0, %struct.uper_c_source_h_t* nocapture %1) {
ret void
}