xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ hz_assert_strncpy_err(char *, char *, int /*<<< orphan*/);
void test_utils_strncpy_0(void) {
  char buf[1];
  hz_assert_strncpy_err(buf, "", 0);
}


x86 assembly (clang, -O0):
<test_utils_strncpy_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rdi
lea    0xedd(%rip),%rsi
xor    %edx,%edx
call   1030 <hz_assert_strncpy_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_utils_strncpy_0>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x7(%rsp),%rdi
xor    %edx,%edx
call   1030 <hz_assert_strncpy_err@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @test_utils_strncpy_0() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = call i32 @hz_assert_strncpy_err(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @test_utils_strncpy_0() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = call i32 @hz_assert_strncpy_err(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void FanChannelRPMSet(unsigned long ulBase, unsigned long ulChannel,
                      unsigned long ulRPM) {
  DEBUG_ASSERT(ulBase == 0x40084000);
  DEBUG_ASSERT(ulChannel < 6);
  DEBUG_ASSERT(ulRPM < 8192);
  (*((volatile unsigned long *)(ulBase + 0x00000014 + (ulChannel * 0x10)))) =
      ulRPM;
}


x86 assembly (clang, -O0):
<FanChannelRPMSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x40084000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x6,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x2000,-0x18(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    $0x14,%rax
mov    -0x10(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FanChannelRPMSet>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
xor    %edi,%edi
cmp    $0x40084000,%r15
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x6,%rbx
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x2000,%r14
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
shl    $0x4,%rbx
mov    %r14,0x14(%r15,%rbx,1)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @FanChannelRPMSet(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, 1074282496
%9 = zext i1 %8 to i32
%10 = call i32 @DEBUG_ASSERT(i32 %9)
%11 = load i64, i64* %5
%12 = icmp ult i64 %11, 6
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load i64, i64* %6
%16 = icmp ult i64 %15, 8192
%17 = zext i1 %16 to i32
%18 = call i32 @DEBUG_ASSERT(i32 %17)
%19 = load i64, i64* %6
%20 = load i64, i64* %4
%21 = add i64 %20, 20
%22 = load i64, i64* %5
%23 = mul i64 %22, 16
%24 = add i64 %21, %23
%25 = inttoptr i64 %24 to i64*
store volatile i64 %19, i64* %25
ret void
}

LLVM IR (-O2):
define void @FanChannelRPMSet(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %0, 1074282496
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = icmp ult i64 %1, 6
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = icmp ult i64 %2, 8192
%11 = zext i1 %10 to i32
%12 = tail call i32 @DEBUG_ASSERT(i32 %11)
%13 = add i64 %0, 20
%14 = shl i64 %1, 4
%15 = add i64 %13, %14
%16 = inttoptr i64 %15 to i64*
store volatile i64 %2, i64* %16
ret void
}
unsigned int RSHash(char *str) {
  const unsigned int b = 378551;
  unsigned int a = 63689;
  unsigned int hash = 0;
  while (*str) {
    hash = hash * a + (*str++);
    a *= b;
  }
  return (hash & 0x7FFFFFFF);
}


x86 assembly (clang, -O0):
<RSHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x5c6b7,-0xc(%rbp)
movl   $0xf8c9,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <RSHash+0x57>
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
imul   $0x5c6b7,-0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    111d <RSHash+0x1d>
mov    -0x14(%rbp),%eax
and    $0x7fffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RSHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1141 <RSHash+0x41>
add    $0x1,%rdi
mov    $0xf8c9,%edx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%esi
imul   %edx,%esi
movsbl %cl,%eax
add    %esi,%eax
imul   $0x5c6b7,%edx,%edx
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <RSHash+0x20>
and    $0x7fffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @RSHash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %14, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i32 [ %13, %4 ], [ 63689, %1 ]
%8 = phi i8* [ %10, %4 ], [ %0, %1 ]
%9 = mul i32 %6, %7
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = sext i8 %5 to i32
%12 = add i32 %9, %11
%13 = mul i32 %7, 378551
%14 = load i8, i8* %10
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4
%17 = and i32 %12, 2147483647
br label %18
18: ; preds = %16, %1
%19 = phi i32 [ 0, %1 ], [ %17, %16 ]
ret i32 %19
}
int fun727() { return 727; }


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

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

LLVM IR (-O0):
define i32 @fun727() {
ret i32 727
}

LLVM IR (-O2):
define i32 @fun727() {
ret i32 727
}
int ft_isprint(int c) {
  if (c >= 32 && c <= 126)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jl     1127 <ft_isprint+0x27>
cmpl   $0x7e,-0x8(%rbp)
jg     1127 <ft_isprint+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_isprint+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
int xtensa_simm16(v)
int v;
{ return v >= -32768 && v <= 32767; }


x86 assembly (clang, -O0):
<xtensa_simm16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xffff8000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xtensa_simm16+0x26>
cmpl   $0x7fff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtensa_simm16>:
movswl %di,%ecx
xor    %eax,%eax
cmp    %edi,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @xtensa_simm16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, -32768
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 32767
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xtensa_simm16(i32 %0) {
%2 = add i32 %0, 32768
%3 = icmp ult i32 %2, 65536
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int link(char const *, char const *);
int zlink(const char *oldpath, const char *newpath) {
  int ret;
  do {
    ret = link(oldpath, newpath);
  } while ((ret < 0) && (errno == EINTR));
  return ret;
  ;
}


x86 assembly (clang, -O0):
<zlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <link@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jge    1159 <zlink+0x49>
mov    0x2e9a(%rip),%rax
mov    (%rax),%rax
mov    0x2e88(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1120 <zlink+0x10>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zlink>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ebb(%rip),%r15
mov    0x2eac(%rip),%r12
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <link@plt>
test   %eax,%eax
jns    1148 <zlink+0x38>
mov    (%r12),%rcx
cmp    %rcx,(%r15)
je     1130 <zlink+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zlink(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %17, %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @link(i8* %7, i8* %8)
store i32 %9, i32* %5
br label %10
10: ; preds = %6
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i64, i64* @errno
%15 = load i64, i64* @EINTR
%16 = icmp eq i64 %14, %15
br label %17
17: ; preds = %13, %10
%18 = phi i1 [ false, %10 ], [ %16, %13 ]
br i1 %18, label %6, label %19
19: ; preds = %17
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @zlink(i8* %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @link(i8* %0, i8* %1)
%5 = icmp slt i32 %4, 0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %3, label %10
10: ; preds = %3
ret i32 %4
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned int GetPhoneLinkTickCount() {
  struct timeval tv;
  if (gettimeofday(&tv, NULL) != 0) {
    return 0;
  }
  return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
}


x86 assembly (clang, -O0):
<GetPhoneLinkTickCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     113b <GetPhoneLinkTickCount+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    115a <GetPhoneLinkTickCount+0x4a>
imul   $0x3e8,-0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetPhoneLinkTickCount>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
jne    114b <GetPhoneLinkTickCount+0x3b>
imul   $0x3e8,0x8(%rsp),%eax
movslq 0xc(%rsp),%rcx
imul   $0x10624dd3,%rcx,%rbx
mov    %rbx,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rbx
add    %ecx,%ebx
add    %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @GetPhoneLinkTickCount() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 0, i32* %1
br label %14
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 1000
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%11 = load i32, i32* %10
%12 = sdiv i32 %11, 1000
%13 = add nsw i32 %9, %12
store i32 %13, i32* %1
br label %14
14: ; preds = %6, %5
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @GetPhoneLinkTickCount() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = sdiv i32 %10, 1000
%12 = add nsw i32 %11, %8
br label %13
13: ; preds = %0, %5
%14 = phi i32 [ %12, %5 ], [ 0, %0 ]
ret i32 %14
}
char *getEncryptedBody(char *message) { return message + 16; }


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

x86 assembly (clang, -O2):
<getEncryptedBody>:
lea    0x10(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @getEncryptedBody(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 16
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void Usage(char *f) {
  printf("Usage: %s <upperbound> < [stdin] > [stdout]\n", f);
  printf("Set an upper bound in a file with a value per line.\n");
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Usage: %s <upperbound> < [stdin] > [stdout]\0A\00"
@.str.1 = [53 x i8] c"Set an upper bound in a file with a value per line.\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Usage: %s <upperbound> < [stdin] > [stdout]\0A\00"
@str = [52 x i8] c"Set an upper bound in a file with a value per line.\00"
define void @Usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int mp2_920_think();
int /*<<< orphan*/ usleep(int);
unsigned int mp2_920_sleep_ms(unsigned int uMs) {
  unsigned int uEventHandled = mp2_920_think();
  usleep(1000 * uMs);
  return uEventHandled;
}


x86 assembly (clang, -O0):
<mp2_920_sleep_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <mp2_920_think@plt>
mov    %eax,-0x8(%rbp)
imul   $0x3e8,-0x4(%rbp),%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2_920_sleep_ms>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <mp2_920_think@plt>
mov    %eax,%ebp
imul   $0x3e8,%ebx,%edi
call   1040 <usleep@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mp2_920_sleep_ms(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @mp2_920_think()
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = mul i32 1000, %5
%7 = call i32 @usleep(i32 %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @mp2_920_sleep_ms(i32 %0) {
%2 = tail call i32 (...) @mp2_920_think()
%3 = mul i32 %0, 1000
%4 = tail call i32 @usleep(i32 %3)
ret i32 %2
}
int hash_void_ptr(void *ptr) {
  int hash;
  int i;
  hash = 0;
  for (i = 0; i < (int)sizeof(ptr) * 8 / 8; i++) {
    hash ^= (unsigned long)ptr >> i * 8;
    hash += i * 17;
    hash &= ((1 << 8) - 1);
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_void_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    115f <hash_void_ptr+0x5f>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
mov    %ecx,%ecx
shr    %cl,%rax
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
xor    %rcx,%rax
mov    %eax,-0xc(%rbp)
imul   $0x11,-0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <hash_void_ptr+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_void_ptr>:
mov    %edi,%eax
shr    $0x8,%eax
xor    %edi,%eax
add    $0x11,%eax
mov    %edi,%ecx
shr    $0x10,%ecx
xor    %eax,%ecx
add    $0x22,%ecx
mov    %edi,%eax
shr    $0x18,%eax
xor    %ecx,%eax
add    $0x33,%eax
mov    %rdi,%rcx
shr    $0x20,%rcx
xor    %eax,%ecx
add    $0x44,%ecx
mov    %rdi,%rax
shr    $0x28,%rax
xor    %ecx,%eax
add    $0x55,%eax
mov    %rdi,%rcx
shr    $0x30,%rcx
xor    %eax,%ecx
add    $0x66,%ecx
shr    $0x38,%rdi
xor    %ecx,%edi
add    $0x77,%edi
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @hash_void_ptr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %25, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %28
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = ptrtoint i8* %9 to i64
%11 = load i32, i32* %4
%12 = mul nsw i32 %11, 8
%13 = zext i32 %12 to i64
%14 = lshr i64 %10, %13
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = xor i64 %16, %14
%18 = trunc i64 %17 to i32
store i32 %18, i32* %3
%19 = load i32, i32* %4
%20 = mul nsw i32 %19, 17
%21 = load i32, i32* %3
%22 = add nsw i32 %21, %20
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = and i32 %23, 255
store i32 %24, i32* %3
br label %25
25: ; preds = %8
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %5
28: ; preds = %5
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @hash_void_ptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = trunc i64 %2 to i32
%5 = lshr i32 %4, 8
%6 = xor i32 %5, %3
%7 = add i32 %6, 17
%8 = trunc i64 %2 to i32
%9 = lshr i32 %8, 16
%10 = xor i32 %7, %9
%11 = add i32 %10, 34
%12 = trunc i64 %2 to i32
%13 = lshr i32 %12, 24
%14 = xor i32 %11, %13
%15 = add i32 %14, 51
%16 = lshr i64 %2, 32
%17 = trunc i64 %16 to i32
%18 = xor i32 %15, %17
%19 = add i32 %18, 68
%20 = lshr i64 %2, 40
%21 = trunc i64 %20 to i32
%22 = xor i32 %19, %21
%23 = add i32 %22, 85
%24 = lshr i64 %2, 48
%25 = trunc i64 %24 to i32
%26 = xor i32 %23, %25
%27 = add i32 %26, 102
%28 = lshr i64 %2, 56
%29 = trunc i64 %28 to i32
%30 = xor i32 %27, %29
%31 = add i32 %30, 119
%32 = and i32 %31, 255
ret i32 %32
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int main() {
  while (1) {
    int x;
    if (x)
      __VERIFIER_error();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1130 <main+0x20>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct vec3i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec3i_add(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
__attribute__((always_)) struct vec3i *
psvec3i_add(struct vec3i *result, struct vec3i *a, struct vec3i *b) {
  vec3i_add((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec3i_add>:
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 <vec3i_add@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec3i_add>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3i_add@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_add(%struct.vec3i* %0, %struct.vec3i* %1, %struct.vec3i* %2) {
%4 = alloca %struct.vec3i*
%5 = alloca %struct.vec3i*
%6 = alloca %struct.vec3i*
store %struct.vec3i* %0, %struct.vec3i** %4
store %struct.vec3i* %1, %struct.vec3i** %5
store %struct.vec3i* %2, %struct.vec3i** %6
%7 = load %struct.vec3i*, %struct.vec3i** %4
%8 = bitcast %struct.vec3i* %7 to i32*
%9 = load %struct.vec3i*, %struct.vec3i** %5
%10 = bitcast %struct.vec3i* %9 to i32*
%11 = load %struct.vec3i*, %struct.vec3i** %6
%12 = bitcast %struct.vec3i* %11 to i32*
%13 = call i32 @vec3i_add(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec3i*, %struct.vec3i** %4
ret %struct.vec3i* %14
}

LLVM IR (-O2):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_add(%struct.vec3i* returned %0, %struct.vec3i* %1, %struct.vec3i* %2) {
%4 = getelementptr %struct.vec3i, %struct.vec3i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec3i, %struct.vec3i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec3i, %struct.vec3i* %2, i64 0, i32 0
%7 = tail call i32 @vec3i_add(i32* %4, i32* %5, i32* %6)
ret %struct.vec3i* %0
}
/* Type definitions */
struct benc_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ benc_float(struct benc_t *, float);
int /*<<< orphan*/ benc_str(struct benc_t *, char const *);
void benc_dict_kv_f(struct benc_t *b, const char *key, float val) {
  benc_str(b, key);
  benc_float(b, val);
}


x86 assembly (clang, -O0):
<benc_dict_kv_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <benc_str@plt>
mov    -0x8(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
call   1040 <benc_float@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<benc_dict_kv_f>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
mov    %rdi,%rbx
call   1030 <benc_str@plt>
mov    %rbx,%rdi
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1040 <benc_float@plt>

LLVM IR (-O0):
%struct.benc_t = type { i32 }
define void @benc_dict_kv_f(%struct.benc_t* %0, i8* %1, float %2) {
%4 = alloca %struct.benc_t*
%5 = alloca i8*
%6 = alloca float
store %struct.benc_t* %0, %struct.benc_t** %4
store i8* %1, i8** %5
store float %2, float* %6
%7 = load %struct.benc_t*, %struct.benc_t** %4
%8 = load i8*, i8** %5
%9 = call i32 @benc_str(%struct.benc_t* %7, i8* %8)
%10 = load %struct.benc_t*, %struct.benc_t** %4
%11 = load float, float* %6
%12 = call i32 @benc_float(%struct.benc_t* %10, float %11)
ret void
}

LLVM IR (-O2):
%struct.benc_t = type { i32 }
define void @benc_dict_kv_f(%struct.benc_t* %0, i8* %1, float %2) {
%4 = tail call i32 @benc_str(%struct.benc_t* %0, i8* %1)
%5 = tail call i32 @benc_float(%struct.benc_t* %0, float %2)
ret void
}
/* Variables and functions */
int f89(int *);
int f90(int *p) { return f89(p); }


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

x86 assembly (clang, -O2):
<f90>:
jmp    1030 <f89@plt>

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

LLVM IR (-O2):
define i32 @f90(i32* %0) {
%2 = tail call i32 @f89(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void talk() { printf("meow \n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"meow \00"
define void @talk() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ path_mtime(char *const);
int cmp_mtime(const void *p1, const void *p2) {
  int ret = 0;
  time_t m1 = path_mtime(*(char *const *)p1);
  time_t m2 = path_mtime(*(char *const *)p2);
  if (m1 > m2)
    ret = 1;
  if (m1 < m2)
    ret = -1;
  return ret;
}


x86 assembly (clang, -O0):
<cmp_mtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <path_mtime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <path_mtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    115c <cmp_mtime+0x4c>
movl   $0x1,-0x14(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    1171 <cmp_mtime+0x61>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_mtime>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rdi),%rdi
call   1030 <path_mtime@plt>
mov    %rax,%r14
mov    (%rbx),%rdi
call   1030 <path_mtime@plt>
xor    %ecx,%ecx
cmp    %rax,%r14
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @cmp_mtime(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = tail call i64 @path_mtime(i8* %4)
%6 = bitcast i8* %1 to i8**
%7 = load i8*, i8** %6
%8 = tail call i64 @path_mtime(i8* %7)
%9 = icmp sgt i64 %5, %8
%10 = zext i1 %9 to i32
%11 = icmp slt i64 %5, %8
%12 = select i1 %11, i32 -1, i32 %10
ret i32 %12
}
/* Variables and functions */
int use_default_colors();
int wrap_use_default_colors(void) { return use_default_colors(); }


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

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

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

LLVM IR (-O2):
define i32 @wrap_use_default_colors() {
%1 = tail call i32 (...) @use_default_colors()
ret i32 %1
}
int lib1t31(void) { return 3; }


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

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

LLVM IR (-O0):
define i32 @lib1t31() {
ret i32 3
}

LLVM IR (-O2):
define i32 @lib1t31() {
ret i32 3
}
char userInit(void) { return 0; }


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

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

LLVM IR (-O0):
define signext i8 @userInit() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @userInit() {
ret i8 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) void
dbg_vAssertNullImpl(const char *Private_pcSrcFileName,
                    uint32_t Private_u32SrcLineNumber,
                    const char *pcAssertionString) {}


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

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

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

LLVM IR (-O2):
define void @dbg_vAssertNullImpl(i8* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_shm_buffer {
  int dummy;
};
struct wl_client {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
__attribute__((visibility("default"))) struct wl_shm_buffer *
wl_shm_buffer_create(struct wl_client *client, uint32_t id, int32_t width,
                     int32_t height, int32_t stride, uint32_t format) {
  return NULL;
}


x86 assembly (clang, -O0):
<wl_shm_buffer_create>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.wl_shm_buffer = type { i32 }
%struct.wl_client = type { i32 }
define %struct.wl_shm_buffer* @wl_shm_buffer_create(%struct.wl_client* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca %struct.wl_client*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store %struct.wl_client* %0, %struct.wl_client** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret %struct.wl_shm_buffer* null
}

LLVM IR (-O2):
%struct.wl_shm_buffer = type { i32 }
%struct.wl_client = type { i32 }
define noalias %struct.wl_shm_buffer* @wl_shm_buffer_create(%struct.wl_client* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret %struct.wl_shm_buffer* null
}
/* Type definitions */
struct stat {
  scalar_t__ st_mtime;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int get_file_tstamp(char *filename) {
  struct stat buf;
  if (stat(filename, &buf) == 0) {
    if (buf.st_mtime != 0)
      return buf.st_mtime;
  }
  return -1;
}


x86 assembly (clang, -O0):
<get_file_tstamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    114f <get_file_tstamp+0x3f>
cmpq   $0x0,-0x18(%rbp)
je     114a <get_file_tstamp+0x3a>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1156 <get_file_tstamp+0x46>
jmp    114f <get_file_tstamp+0x3f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_tstamp>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%rcx
cmp    $0x1,%rcx
sbb    %edx,%edx
neg    %rax
sbb    %eax,%eax
or     %ecx,%eax
or     %edx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i64 }
define i32 @get_file_tstamp(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = icmp ne i64 %7, 0
%9 = select i1 %5, i1 %8, i1 false
%10 = trunc i64 %7 to i32
%11 = select i1 %9, i32 %10, i32 -1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "\teCryptfs umount helper\n\tusage: "
                  "umount [ecryptfs mount point]\n");
  exit(-EINVAL);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [63 x i8] c"\09eCryptfs umount helper\0A\09usage: umount [ecryptfs mount point]\0A\00"
@EINVAL = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [63 x i8] c"\09eCryptfs umount helper\0A\09usage: umount [ecryptfs mount point]\0A\00"
@EINVAL = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void main() {
  int y;
  int i = 0;
  int x = 0;
  if (y < 0) {
    y = 0;
  } else {
    y = 5;
  }
  x = y;
  x = x + 1;
  while (1) {
    if (i == 1) {
      x = x + 1;
      i = 0;
    } else {
      x = x - 1;
      i = 1;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1128 <main+0x28>
movl   $0x0,-0x4(%rbp)
jmp    112f <main+0x2f>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    115d <main+0x5d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    116d <main+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    113e <main+0x3e>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

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

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
void glMaterialxv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glMaterialxv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add(int, int);
int /*<<< orphan*/ echo(int /*<<< orphan*/, char *);
main() { echo(add(1, 2), " Hello World!"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <add@plt>
mov    %eax,%edi
lea    0xec4(%rip),%rsi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <add@plt>
lea    0xec9(%rip),%rsi
mov    %eax,%edi
call   1030 <echo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c" Hello World!\00"
define i32 @main() {
%1 = call i32 @add(i32 1, i32 2)
%2 = call i32 @echo(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c" Hello World!\00"
define i32 @main() {
%1 = tail call i32 @add(i32 1, i32 2)
%2 = tail call i32 @echo(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int a$b(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @"a$b"() {
ret i32 1
}

LLVM IR (-O2):
define i32 @"a$b"() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void h2o_fatal(const char *msg) {
  fprintf(stderr, "fatal:%s\n", msg);
  abort();
}


x86 assembly (clang, -O0):
<h2o_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<h2o_fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"fatal:%s\0A\00"
define void @h2o_fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
void reduce(int numerator, int denominator, int *reduced_numerator,
            int *reduced_denominator) {
  int gcd, numerator_cache = numerator, denominator_cache = denominator;
  while (denominator != 0) {
    gcd = numerator;
    numerator = denominator;
    denominator = gcd % denominator;
  }
  gcd = numerator;
  *reduced_numerator = numerator_cache / gcd;
  *reduced_denominator = denominator_cache / gcd;
}


x86 assembly (clang, -O0):
<reduce>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1143 <reduce+0x43>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x8(%rbp)
jmp    111e <reduce+0x1e>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
cltd
idivl  -0x1c(%rbp)
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reduce>:
mov    %rdx,%r8
mov    %esi,%r9d
mov    %edi,%esi
test   %r9d,%r9d
je     112b <reduce+0x2b>
mov    %esi,%eax
mov    %r9d,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%edi
cltd
idiv   %edi
mov    %edi,%eax
test   %edx,%edx
jne    1120 <reduce+0x20>
mov    %esi,%eax
cltd
idiv   %edi
mov    %eax,(%r8)
mov    %r9d,%eax
cltd
idiv   %edi
mov    %eax,(%rcx)
ret

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

LLVM IR (-O2):
define void @reduce(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = icmp eq i32 %1, 0
br i1 %5, label %11, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %8, %6 ], [ %0, %4 ]
%8 = phi i32 [ %9, %6 ], [ %1, %4 ]
%9 = srem i32 %7, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %4
%12 = phi i32 [ %0, %4 ], [ %8, %6 ]
%13 = sdiv i32 %0, %12
store i32 %13, i32* %2
%14 = sdiv i32 %1, %12
store i32 %14, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
scalar_t__ memcmp(char const *, char *, int);
int range_magic_id(const char *magic_id) {
  char *str = "Warcraft III recorded game\32";
  if (0 != memcmp(magic_id, str, sizeof(str) + 1)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<range_magic_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x9,%edx
call   1030 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1153 <range_magic_id+0x43>
movl   $0x1,-0x4(%rbp)
jmp    115a <range_magic_id+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_magic_id>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x9,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Warcraft III recorded game\1A\00"
define i32 @range_magic_id(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @memcmp(i8* %5, i8* %6, i32 9)
%8 = icmp ne i64 0, %7
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [28 x i8] c"Warcraft III recorded game\1A\00"
define i32 @range_magic_id(i8* %0) {
%2 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 9)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmplt_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_cmplt_epi32(__m128i A, __m128i B) {
  return _mm_cmplt_epi32(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_cmplt_epi32>:
jmp    1030 <_mm_cmplt_epi32@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmplt_epi32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmplt_epi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ test_array_iter_add();
int /*<<< orphan*/ test_array_iter_remove();
int /*<<< orphan*/ test_array_iter_replace();
void test_array_iter() {
  test_array_iter_remove();
  test_array_iter_add();
  test_array_iter_replace();
}


x86 assembly (clang, -O0):
<test_array_iter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_array_iter_remove@plt>
mov    $0x0,%al
call   1050 <test_array_iter_add@plt>
mov    $0x0,%al
call   1040 <test_array_iter_replace@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_array_iter>:
push   %rax
xor    %eax,%eax
call   1030 <test_array_iter_remove@plt>
xor    %eax,%eax
call   1050 <test_array_iter_add@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_array_iter_replace@plt>

LLVM IR (-O0):
define void @test_array_iter() {
%1 = call i32 (...) @test_array_iter_remove()
%2 = call i32 (...) @test_array_iter_add()
%3 = call i32 (...) @test_array_iter_replace()
ret void
}

LLVM IR (-O2):
define void @test_array_iter() {
%1 = tail call i32 (...) @test_array_iter_remove()
%2 = tail call i32 (...) @test_array_iter_add()
%3 = tail call i32 (...) @test_array_iter_replace()
ret void
}