xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
int get_XGraphicsExposeEvent_x(void *_p) {
  return (int)((XGraphicsExposeEvent *)_p)->x;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XGraphicsExposeEvent_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int boundedPixel(int x, int y) {
  return (x >= 0) && (x <= 1024) && (y >= 0) && (y <= 768);
}


x86 assembly (clang, -O0):
<boundedPixel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jl     1147 <boundedPixel+0x47>
xor    %eax,%eax
cmpl   $0x400,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jg     1147 <boundedPixel+0x47>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1147 <boundedPixel+0x47>
cmpl   $0x300,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<boundedPixel>:
cmp    $0x401,%edi
setb   %al
cmp    $0x301,%esi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @boundedPixel(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 = icmp sge i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 1024
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 768
br label %16
16: ; preds = %13, %10, %7, %2
%17 = phi i1 [ false, %10 ], [ false, %7 ], [ false, %2 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @boundedPixel(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, 1025
%4 = icmp ult i32 %1, 769
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int close(int);
int rlClose(int theSocket) { return close(theSocket); }


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

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

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

LLVM IR (-O2):
define i32 @rlClose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
int bit_turnon_trailing_zeros(int n) { return (n | (n - 1)); }


x86 assembly (clang, -O0):
<bit_turnon_trailing_zeros>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_turnon_trailing_zeros>:
lea    -0x1(%rdi),%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @bit_turnon_trailing_zeros(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = or i32 %3, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @bit_turnon_trailing_zeros(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = or i32 %2, %0
ret i32 %3
}
unsigned int test_23(unsigned int a, int b, int c) {
  return (a >> 31) | (b << 13);
}


x86 assembly (clang, -O0):
<test_23>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1f,%eax
mov    -0x8(%rbp),%ecx
shl    $0xd,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_23>:
shr    $0x1f,%edi
shl    $0xd,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @test_23(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = lshr i32 %7, 31
%9 = load i32, i32* %5
%10 = shl i32 %9, 13
%11 = or i32 %8, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_23(i32 %0, i32 %1, i32 %2) {
%4 = lshr i32 %0, 31
%5 = shl i32 %1, 13
%6 = or i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int resp, a, b, c, d, resp1;
  resp = a * b;
  resp1 = c * d;
  assert(resp == a * b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
store i32 %9, i32* %1
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = mul nsw i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = mul nsw i32 %14, %15
%17 = icmp eq i32 %13, %16
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
long fibonacci(long n) {
  if (n < 2)
    return n;
  else
    return (fibonacci(n - 1) + fibonacci(n - 2));
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x2,-0x10(%rbp)
jge    1134 <fibonacci+0x24>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <fibonacci+0x50>
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fibonacci@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x2,%rdi
call   1030 <fibonacci@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
cmp    $0x2,%rdi
jl     1139 <fibonacci+0x29>
mov    %rdi,%rbx
lea    -0x1(%rbx),%rdi
call   1030 <fibonacci@plt>
lea    -0x2(%rbx),%rdi
add    %rax,%r14
cmp    $0x3,%rbx
mov    %rdi,%rbx
ja     1120 <fibonacci+0x10>
add    %rdi,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @fibonacci(i64 %0) {
%2 = icmp slt i64 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ %0, %1 ]
%5 = phi i64 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i64 %4, -1
%7 = tail call i64 @fibonacci(i64 %6)
%8 = add nsw i64 %4, -2
%9 = add nsw i64 %7, %5
%10 = icmp ult i64 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i64 [ 0, %1 ], [ %9, %3 ]
%13 = phi i64 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i64 %13, %12
ret i64 %14
}
int f1(int *p) {
  int r;
#pragma omp atomic capture
  {
    r = *p;
    (*p)++;
  }
  return r;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    (%rdi),%eax
lea    0x1(%rax),%ecx
mov    %ecx,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @f1(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ EVP_cleanup();
void crypto_cleanup() {
  EVP_cleanup();
  ERR_free_strings();
}


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

x86 assembly (clang, -O2):
<crypto_cleanup>:
push   %rax
xor    %eax,%eax
call   1030 <EVP_cleanup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ERR_free_strings@plt>

LLVM IR (-O0):
define void @crypto_cleanup() {
%1 = call i32 (...) @EVP_cleanup()
%2 = call i32 (...) @ERR_free_strings()
ret void
}

LLVM IR (-O2):
define void @crypto_cleanup() {
%1 = tail call i32 (...) @EVP_cleanup()
%2 = tail call i32 (...) @ERR_free_strings()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
char *sr_skip_non_whitespace(const char *s) {
  while (*s && !isspace(*s))
    ++s;
  return (char *)s;
}


x86 assembly (clang, -O0):
<sr_skip_non_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <sr_skip_non_whitespace+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <sr_skip_non_whitespace+0x48>
jmp    1169 <sr_skip_non_whitespace+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <sr_skip_non_whitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_skip_non_whitespace>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <sr_skip_non_whitespace+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <sr_skip_non_whitespace+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <sr_skip_non_whitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @sr_skip_non_whitespace(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
int LargerOf(int a, int b) {
  if (a == b)
    return a;
  if (a > b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<LargerOf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1121 <LargerOf+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113e <LargerOf+0x3e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1138 <LargerOf+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113e <LargerOf+0x3e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @LargerOf(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int year;
  scanf("%d", &year);
  if (year >= 1980 && year <= 1989)
    printf("YES");
  else
    printf("NO");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x7bc,-0x8(%rbp)
jl     116a <main+0x4a>
cmpl   $0x7c5,-0x8(%rbp)
jg     116a <main+0x4a>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1176 <main+0x56>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xfffff844,%eax
add    0x4(%rsp),%eax
cmp    $0xa,%eax
lea    0xebe(%rip),%rax
lea    0xebb(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 1980
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 1989
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %6, %0
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add i32 %4, -1980
%6 = icmp ult i32 %5, 10
%7 = select i1 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
void thread_2(void) {
  int i;
  for (i = 0; i < 3; i++) {
    printf("This is a pthread_2.\n");
    sleep(2);
  }
  pthread_exit(0);
}


x86 assembly (clang, -O0):
<thread_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    116d <thread_2+0x3d>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <thread_2+0xf>
xor    %edi,%edi
call   1040 <pthread_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_2>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
pop    %rbx
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"This is a pthread_2.\0A\00"
define void @thread_2() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 3
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @sleep(i32 2)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
%12 = call i32 @pthread_exit(i32 0)
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"This is a pthread_2.\00"
define void @thread_2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 2)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 2)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @sleep(i32 2)
%7 = tail call i32 @pthread_exit(i32 0)
ret void
}
int c048(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c048() {
ret i32 0
}
extern void Nothing() {}


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

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

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

LLVM IR (-O2):
define void @Nothing() {
ret void
}
/* Variables and functions */
double exp(double);
double sigmoid_activation_function(double z) { return 1.0 / (1.0 + exp(-z)); }


x86 assembly (clang, -O0):
<sigmoid_activation_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  0xeba(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xeae(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid_activation_function>:
push   %rax
xorpd  0xee7(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xeea(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sigmoid_activation_function(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call double @exp(double %4)
%6 = fadd double 1.000000e+00, %5
%7 = fdiv double 1.000000e+00, %6
ret double %7
}

LLVM IR (-O2):
define double @sigmoid_activation_function(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double 1.000000e+00, %4
ret double %5
}
char *ft_strlowcase(char *str) {
  char *tmp;
  tmp = str;
  while (*tmp) {
    if (*tmp >= 'A' && *tmp <= 'Z')
      (*tmp) += 32;
    tmp++;
  }
  return (str);
}


x86 assembly (clang, -O0):
<ft_strlowcase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <ft_strlowcase+0x5a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1149 <ft_strlowcase+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1149 <ft_strlowcase+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ft_strlowcase+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strlowcase>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <ft_strlowcase+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <ft_strlowcase+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <ft_strlowcase+0x2c>
lea    -0x41(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <ft_strlowcase+0x10>
add    $0x20,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <ft_strlowcase+0x10>
ret

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

LLVM IR (-O2):
define i8* @ft_strlowcase(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
int toggle_attr(int var, int attr) { return var ^ attr; }


x86 assembly (clang, -O0):
<toggle_attr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle_attr>:
mov    %edi,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @toggle_attr(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 = xor i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @toggle_attr(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int rand();
int Random() { return rand() % 100; }


x86 assembly (clang, -O0):
<Random>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Random() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 100
ret i32 %2
}

LLVM IR (-O2):
define i32 @Random() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 100
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ simple_hash(char *);
int main(int argc, char *argv[]) {
  while (--argc > 0) {
    ++argv;
    printf("hash(%s) = %ld\n", *argv, simple_hash(*argv));
  }
  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    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1182 <main+0x62>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <simple_hash@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1164 <main+0x44>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x8,%rbx
add    $0x1,%ebp
lea    0xec1(%rip),%r14
nop
mov    (%rbx),%r15
mov    %r15,%rdi
call   1040 <simple_hash@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x8,%rbx
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
ja     1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"hash(%s) = %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i8** [ %8, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = add nsw i32 %6, -1
%8 = getelementptr inbounds i8*, i8** %5, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @simple_hash(i8* %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %10)
%12 = icmp ugt i32 %6, 2
br i1 %12, label %4, label %13
13: ; preds = %4, %2
ret i32 0
}
int symb_count(char input[]) {
  int count = 0;
  while (input[count] != '\0')
    ++count;
  return count;
}


x86 assembly (clang, -O0):
<symb_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <symb_count+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <symb_count+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symb_count>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <symb_count+0x10>
ret

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

LLVM IR (-O2):
define i32 @symb_count(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
unsigned int f89(unsigned int x, unsigned int y) {
  return (x << ((-y) & (8 * sizeof(unsigned int) - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f89>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
mov    %ecx,%ecx
and    $0x1f,%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f89>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f89(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 = sub i32 0, %6
%8 = zext i32 %7 to i64
%9 = and i64 %8, 31
%10 = trunc i64 %9 to i32
%11 = shl i32 %5, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = lshr i32 %12, %13
%15 = add i32 %11, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f89(i32 %0, i32 %1) {
%3 = sub i32 0, %1
%4 = and i32 %3, 31
%5 = shl i32 %0, %4
%6 = lshr i32 %0, %1
%7 = add i32 %5, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkfifo(char const *, int /*<<< orphan*/);
int create_pipe(const char *name, mode_t mode) {
  int pipe;
  pipe = mkfifo(name, mode);
  return pipe;
}


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

x86 assembly (clang, -O2):
<create_pipe>:
jmp    1030 <mkfifo@plt>

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

LLVM IR (-O2):
define i32 @create_pipe(i8* %0, i32 %1) {
%3 = tail call i32 @mkfifo(i8* %0, i32 %1)
ret i32 %3
}
int main() {
  signed int i;
  i++;
}


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

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

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

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

/* Variables and functions */
uint8_t ReverseBits8(uint8_t val) {
  val = ((val >> 1) & 0x55) | ((val << 1) & 0xaa);
  val = ((val >> 2) & 0x33) | ((val << 2) & 0xcc);
  val = ((val >> 4) & 0x0f) | ((val << 4) & 0xf0);
  return val;
}


x86 assembly (clang, -O0):
<ReverseBits8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
and    $0x55,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
and    $0xaa,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
and    $0x33,%eax
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
and    $0xcc,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
mov    -0x4(%rbp),%ecx
shl    $0x4,%ecx
and    $0xf0,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReverseBits8>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %al,%dil
mov    %edi,%eax
and    $0x55,%al
add    %al,%al
shr    %dil
and    $0x55,%dil
or     %al,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @ReverseBits8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = and i32 %4, 85
%6 = load i32, i32* %2
%7 = shl i32 %6, 1
%8 = and i32 %7, 170
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = ashr i32 %10, 2
%12 = and i32 %11, 51
%13 = load i32, i32* %2
%14 = shl i32 %13, 2
%15 = and i32 %14, 204
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = ashr i32 %17, 4
%19 = and i32 %18, 15
%20 = load i32, i32* %2
%21 = shl i32 %20, 4
%22 = and i32 %21, 240
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @ReverseBits8(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i8 @llvm.bitreverse.i8(i8 %2)
%4 = zext i8 %3 to i32
ret i32 %4
}
unsigned int _unpack_word(unsigned char *buf) {
  return ((unsigned int)buf[0]) & ((unsigned int)buf[1] << 8) &
         ((unsigned int)buf[2] << 16) & ((unsigned int)buf[3] << 24);
}


x86 assembly (clang, -O0):
<_unpack_word>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
and    %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @_unpack_word(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ logger_buffer_search_buffer(void *);
int /*<<< orphan*/ logger_start_buffer(void *);
int /*<<< orphan*/ logger_stop(int /*<<< orphan*/, int);
int logger_buffer_renamed_signal_cb(void *data, const char *signal,
                                    const char *type_data, void *signal_data) {
  (void)data;
  (void)signal;
  (void)type_data;
  logger_stop(logger_buffer_search_buffer(signal_data), 1);
  logger_start_buffer(signal_data);
  return 0;
}


x86 assembly (clang, -O0):
<logger_buffer_renamed_signal_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <logger_buffer_search_buffer@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <logger_stop@plt>
mov    -0x20(%rbp),%rdi
call   1030 <logger_start_buffer@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_buffer_renamed_signal_cb>:
push   %rbx
mov    %rcx,%rbx
mov    %rcx,%rdi
call   1050 <logger_buffer_search_buffer@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <logger_stop@plt>
mov    %rbx,%rdi
call   1030 <logger_start_buffer@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @logger_buffer_renamed_signal_cb(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @logger_buffer_search_buffer(i8* %12)
%14 = call i32 @logger_stop(i32 %13, i32 1)
%15 = load i8*, i8** %8
%16 = call i32 @logger_start_buffer(i8* %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @logger_buffer_renamed_signal_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @logger_buffer_search_buffer(i8* %3)
%6 = tail call i32 @logger_stop(i32 %5, i32 1)
%7 = tail call i32 @logger_start_buffer(i8* %3)
ret i32 0
}
void imprimirFactura() {}


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

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

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

LLVM IR (-O2):
define void @imprimirFactura() {
ret void
}
/* Variables and functions */
int at91_serial_getc();
int getc() { return at91_serial_getc(); }


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

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

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

LLVM IR (-O2):
define i32 @getc() {
%1 = tail call i32 (...) @at91_serial_getc()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *, unsigned short);
void report_version(unsigned long cpuid) {
  unsigned short vendor, model;
  vendor = (cpuid >> 16) & 0xffff;
  model = cpuid & 0xffff;
  printk("Vendor:       %04x\n", vendor);
  printk("Model:        %04x\n", model);
}


x86 assembly (clang, -O0):
<report_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
and    $0xffff,%rax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
mov    %ax,-0xc(%rbp)
lea    0xebd(%rip),%rdi
movzwl -0xa(%rbp),%esi
call   1030 <printk@plt>
lea    0xec1(%rip),%rdi
movzwl -0xc(%rbp),%esi
call   1030 <printk@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_version>:
push   %rbx
mov    %rdi,%rbx
mov    %ebx,%esi
shr    $0x10,%esi
lea    0xee0(%rip),%rdi
call   1030 <printk@plt>
movzwl %bx,%esi
lea    0xee5(%rip),%rdi
pop    %rbx
jmp    1030 <printk@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Vendor: %04x\0A\00"
@.str.1 = [20 x i8] c"Model: %04x\0A\00"
define void @report_version(i64 %0) {
%2 = alloca i64
%3 = alloca i16
%4 = alloca i16
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = lshr i64 %5, 16
%7 = and i64 %6, 65535
%8 = trunc i64 %7 to i16
store i16 %8, i16* %3
%9 = load i64, i64* %2
%10 = and i64 %9, 65535
%11 = trunc i64 %10 to i16
store i16 %11, i16* %4
%12 = load i16, i16* %3
%13 = call i32 @printk(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i16 zeroext %12)
%14 = load i16, i16* %4
%15 = call i32 @printk(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i16 zeroext %14)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Vendor: %04x\0A\00"
@.str.1 = [20 x i8] c"Model: %04x\0A\00"
define void @report_version(i64 %0) {
%2 = lshr i64 %0, 16
%3 = trunc i64 %2 to i16
%4 = trunc i64 %0 to i16
%5 = tail call i32 @printk(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i16 zeroext %3)
%6 = tail call i32 @printk(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i16 zeroext %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendWeaponPref2();
void FlipCam2_OnChange(void) { SendWeaponPref2(); }


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

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

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

LLVM IR (-O2):
define void @FlipCam2_OnChange() {
%1 = tail call i32 (...) @SendWeaponPref2()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int char_to_num(int n) {
  assert(n >= 48 && n <= 57);
  return n - 48;
}


x86 assembly (clang, -O0):
<char_to_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1134 <char_to_num+0x24>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_to_num>:
push   %rbx
lea    -0x30(%rdi),%ebx
xor    %edi,%edi
cmp    $0xa,%ebx
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @char_to_num(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 48
ret i32 %13
}

LLVM IR (-O2):
define i32 @char_to_num(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret i32 %2
}
int CMUTIL_TimerAddrComp(const void *a, const void *b) {
  return a < b ? -1 : a > b ? 1 : 0;
}


x86 assembly (clang, -O0):
<CMUTIL_TimerAddrComp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <CMUTIL_TimerAddrComp+0x27>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    113f <CMUTIL_TimerAddrComp+0x3f>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmova  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMUTIL_TimerAddrComp>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CMUTIL_TimerAddrComp(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 = icmp ult i8* %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
br label %15
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = icmp ugt i8* %10, %11
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
br label %15
15: ; preds = %9, %8
%16 = phi i32 [ -1, %8 ], [ %14, %9 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @CMUTIL_TimerAddrComp(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = icmp ugt i8* %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ killxsvr();
int /*<<< orphan*/ perror(char *);
void err_quit(char *msg) {
  perror(msg);
  killxsvr();
}


x86 assembly (clang, -O0):
<err_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x0,%al
call   1030 <killxsvr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_quit>:
push   %rax
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <killxsvr@plt>

LLVM IR (-O0):
define void @err_quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 (...) @killxsvr()
ret void
}

LLVM IR (-O2):
define void @err_quit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 (...) @killxsvr()
ret void
}
/* Type definitions */
typedef scalar_t__ uint_fast16_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_uint_fast16_t(uint_fast16_t const k1,
                                          uint_fast16_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_uint_fast16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_uint_fast16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_uint_fast16_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_uint_fast16_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ XAnyEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XAnyEvent(void) {
  XAnyEvent *_p = (XAnyEvent *)malloc(sizeof(XAnyEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XAnyEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XAnyEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XAnyEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XAnyEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XAnyEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XAnyEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Variables and functions */
int printf(char *);
int header_content_type_ogg(void) {
  return printf("Content-Type: application/ogg\n");
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Content-Type: application/ogg\0A\00"
define i32 @header_content_type_ogg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [31 x i8] c"Content-Type: application/ogg\0A\00"
define i32 @header_content_type_ogg() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__6__IO__clr();
void CC2420ControlP__RSTN__clr(void) { HplAtm128GeneralIOPinP__6__IO__clr(); }


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__RSTN__clr() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__6__IO__clr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, unsigned char *, int);
void ft_putchar_fd(char c, int fd) { write(fd, (unsigned char *)&c, 1); }


x86 assembly (clang, -O0):
<ft_putchar_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar_fd>:
push   %rax
mov    %esi,%eax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @ft_putchar_fd(i8 signext %0, i32 %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = call i32 @write(i32 %1, i8* %3, i32 1)
ret void
}