xunge/DecIR huggingface dataset:
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int c;
  while ((c = getchar()) != EOF) {
    if (c == '\n')
      printf("\n");
    else
      printf("%c", c - 7);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     117e <main+0x5e>
cmpl   $0xa,-0x8(%rbp)
jne    1165 <main+0x45>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1179 <main+0x59>
mov    -0x8(%rbp),%esi
sub    $0x7,%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1159 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x7(%rax),%edi
cmp    $0xa,%eax
cmove  %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 10
%7 = add nsw i32 %5, -7
%8 = select i1 %6, i32 10, i32 %7
%9 = tail call i32 @putchar(i32 %8)
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
ret i32 0
}
__attribute__((no, noclone)) int h0(int A, int B) {
  int C = A | B;
  int D = A ^ B;
  return C & ~D;
}


x86 assembly (clang, -O0):
<h0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @h0(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = or i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = xor i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = xor i32 %14, -1
%16 = and i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @h0(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ strtotime(char const *, char const **);
int parse_time_seconds(const char **str, struct timespec *ts) {
  ts->tv_sec = strtotime(*str, str);
  return errno ? -1 : 0;
}


x86 assembly (clang, -O0):
<parse_time_seconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strtotime@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2ea1(%rip),%rax
mov    (%rax),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_time_seconds>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    (%rdi),%rdi
call   1030 <strtotime@plt>
mov    %eax,(%rbx)
mov    0x2eb8(%rip),%rax
xor    %ecx,%ecx
cmp    (%rax),%rcx
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@errno = global i64 0
define i32 @parse_time_seconds(i8** %0, %struct.timespec* %1) {
%3 = alloca i8**
%4 = alloca %struct.timespec*
store i8** %0, i8*** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = load i8**, i8*** %3
%8 = call i32 @strtotime(i8* %6, i8** %7)
%9 = load %struct.timespec*, %struct.timespec** %4
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %9, i32 0, i32 0
store i32 %8, i32* %10
%11 = load i64, i64* @errno
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 -1, i32 0
ret i32 %14
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@errno = global i64 0
define i32 @parse_time_seconds(i8** %0, %struct.timespec* nocapture writeonly %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @strtotime(i8* %3, i8** %0)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 %4, i32* %5
%6 = load i64, i64* @errno
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
ret i32 %8
}
int main() {
  int arr[] = {1, 2, 3};
  return arr > 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rax
mov    $0x3,%ecx
cmp    %rcx,%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    -0xc(%rsp),%rcx
xor    %eax,%eax
cmp    $0x4,%rcx
setae  %al
ret

LLVM IR (-O0):
@__const.main.arr = [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = bitcast [3 x i32]* %2 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%5 = icmp ugt i32* %4, inttoptr (i64 3 to i32*)
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = icmp ugt i32* %3, inttoptr (i64 3 to i32*)
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf_ints(int /*<<< orphan*/, char *, int *, int, char *);
int /*<<< orphan*/ stdout;
void printf_ints(char *message1, int *ints, int size, char *message2) {
  fprintf_ints(stdout, message1, ints, size, message2);
}


x86 assembly (clang, -O0):
<printf_ints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
call   1030 <fprintf_ints@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_ints>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprintf_ints@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @printf_ints(i8* %0, i32* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf_ints(i32 %5, i8* %0, i32* %1, i32 %2, i8* %3)
ret void
}
unsigned short int end_of(void) { return 0; }


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

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

LLVM IR (-O0):
define zeroext i16 @end_of() {
ret i16 0
}

LLVM IR (-O2):
define zeroext i16 @end_of() {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s [Start-city Destination-city]]\n", argv0);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"Usage: %s [Start-city Destination-city]]\0A\00"
define void @usage(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 ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"Usage: %s [Start-city Destination-city]]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpunord_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpunord_pd(__m128d A, __m128d B) {
  return _mm_cmpunord_pd(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpunord_pd>:
jmp    1030 <_mm_cmpunord_pd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpunord_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpunord_pd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void TIM1_UP_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @TIM1_UP_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @TIM1_UP_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int cbmarch_raw_write(int, void const *, size_t);
int cbm_raw_write(int HandleDevice, const void *Buffer, size_t Count) {
  ;
  return cbmarch_raw_write(HandleDevice, Buffer, Count);
}


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

x86 assembly (clang, -O2):
<cbm_raw_write>:
jmp    1030 <cbmarch_raw_write@plt>

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

LLVM IR (-O2):
define i32 @cbm_raw_write(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @cbmarch_raw_write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int x = 10;
  int n = 0;
  while (x) {
    n += x & 1;
    x >>= 1;
  }
  printf("%d\n", n);
  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)
movl   $0xa,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1158 <main+0x48>
mov    -0x14(%rbp),%eax
and    $0x1,%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
mov    -0x18(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Type definitions */
struct ring {
  int dummy;
};

/* Variables and functions */
unsigned int ring_avail(struct ring *);
unsigned int ring_write(struct ring *, void *, unsigned int);
unsigned int ring_writeall(struct ring *ring, void *buffer,
                           unsigned int count) {
  if (count > ring_avail(ring))
    return 0;
  return ring_write(ring, buffer, count);
}


x86 assembly (clang, -O0):
<ring_writeall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ring_avail@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
jbe    115b <ring_writeall+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    116e <ring_writeall+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <ring_write@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ring_writeall>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <ring_avail@plt>
cmp    %ebp,%eax
jae    113c <ring_writeall+0x1c>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <ring_write@plt>

LLVM IR (-O0):
%struct.ring = type { i32 }
define i32 @ring_writeall(%struct.ring* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.ring*
%6 = alloca i8*
%7 = alloca i32
store %struct.ring* %0, %struct.ring** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = load %struct.ring*, %struct.ring** %5
%10 = call i32 @ring_avail(%struct.ring* %9)
%11 = icmp ugt i32 %8, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 0, i32* %4
br label %18
13: ; preds = %3
%14 = load %struct.ring*, %struct.ring** %5
%15 = load i8*, i8** %6
%16 = load i32, i32* %7
%17 = call i32 @ring_write(%struct.ring* %14, i8* %15, i32 %16)
store i32 %17, i32* %4
br label %18
18: ; preds = %13, %12
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
%struct.ring = type { i32 }
define i32 @ring_writeall(%struct.ring* %0, i8* %1, i32 %2) {
%4 = tail call i32 @ring_avail(%struct.ring* %0)
%5 = icmp ult i32 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @ring_write(%struct.ring* %0, i8* %1, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ 0, %3 ]
ret i32 %9
}
int level_to_pers(int level) {
  switch (level) {
  case (-4):
    return 7UL;
  case -3:
    return 6UL;
  case -2:
    return 5UL;
  case (-1):
    return 1UL;
  case 0:
    return 2UL;
  case 1:
    return 3UL;
  case 4:
  case 5:
    return 4UL;
  case 6:
    return 8UL;
  case 10:
    return 9UL;
  }
  return 0UL;
}


x86 assembly (clang, -O0):
<level_to_pers>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xe,%eax
ja     119c <level_to_pers+0x9c>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x7,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x6,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x5,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x1,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x2,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x3,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x4,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x8,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x9,-0x4(%rbp)
jmp    11a3 <level_to_pers+0xa3>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<level_to_pers>:
add    $0x4,%edi
xor    %eax,%eax
cmp    $0xe,%edi
ja     1117 <level_to_pers+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @level_to_pers(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %14 [
i32 -4, label %5
i32 -3, label %6
i32 -2, label %7
i32 -1, label %8
i32 0, label %9
i32 1, label %10
i32 4, label %11
i32 5, label %11
i32 6, label %12
i32 10, label %13
]
5: ; preds = %1
store i32 7, i32* %2
br label %15
6: ; preds = %1
store i32 6, i32* %2
br label %15
7: ; preds = %1
store i32 5, i32* %2
br label %15
8: ; preds = %1
store i32 1, i32* %2
br label %15
9: ; preds = %1
store i32 2, i32* %2
br label %15
10: ; preds = %1
store i32 3, i32* %2
br label %15
11: ; preds = %1, %1
store i32 4, i32* %2
br label %15
12: ; preds = %1
store i32 8, i32* %2
br label %15
13: ; preds = %1
store i32 9, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@switch.table.level_to_pers = [15 x i32] [i32 7, i32 6, i32 5, i32 1, i32 2, i32 3, i32 0, i32 0, i32 4, i32 4, i32 8, i32 0, i32 0, i32 0, i32 9]
define i32 @level_to_pers(i32 %0) {
%2 = add i32 %0, 4
%3 = icmp ult i32 %2, 15
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [15 x i32], [15 x i32]* @switch.table.level_to_pers, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int RCCE_finalize(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @RCCE_finalize() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SerialStartP__Boot__booted();
int /*<<< orphan*/ WaterPumpC__Boot__booted();
void RealMainP__Boot__booted(void) {
  SerialStartP__Boot__booted();
  WaterPumpC__Boot__booted();
}


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

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

LLVM IR (-O0):
define void @RealMainP__Boot__booted() {
%1 = call i32 (...) @SerialStartP__Boot__booted()
%2 = call i32 (...) @WaterPumpC__Boot__booted()
ret void
}

LLVM IR (-O2):
define void @RealMainP__Boot__booted() {
%1 = tail call i32 (...) @SerialStartP__Boot__booted()
%2 = tail call i32 (...) @WaterPumpC__Boot__booted()
ret void
}
void wifi_rsp_sme_get_signal_quality(
    const struct wifi_msg_sme_get_signal_quality_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_get_signal_quality_rsp_t = type opaque
define void @wifi_rsp_sme_get_signal_quality(%struct.wifi_msg_sme_get_signal_quality_rsp_t* nocapture %0) {
ret void
}
int ind(char *s, char c) {
  register int x;
  for (x = 0; s[x]; x++)
    if (s[x] == c)
      return x;
  return -1;
}


x86 assembly (clang, -O0):
<ind>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115d <ind+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114a <ind+0x4a>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <ind+0x64>
jmp    114f <ind+0x4f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <ind+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <ind+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <ind+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <ind+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ind(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ 0, %2 ]
%7 = phi i8 [ %12, %9 ], [ %3, %2 ]
%8 = icmp eq i8 %7, %1
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %16, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %9, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ rijndaelKeySetupEnc(unsigned int *, unsigned char *, int);
void aeskey(unsigned int *space, unsigned char *key) {
  rijndaelKeySetupEnc(space, key, 256);
}


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

x86 assembly (clang, -O2):
<aeskey>:
mov    $0x100,%edx
jmp    1030 <rijndaelKeySetupEnc@plt>

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

LLVM IR (-O2):
define void @aeskey(i32* %0, i8* %1) {
%3 = tail call i32 @rijndaelKeySetupEnc(i32* %0, i8* %1, i32 256)
ret void
}
/* Variables and functions */
int creer_serveur(int);
int /*<<< orphan*/ perror(char *);
int main(void) {
  if (creer_serveur(8080) == -1) {
    perror("creer_serveur_main");
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1f90,%edi
call   1030 <creer_serveur@plt>
cmp    $0xffffffff,%eax
jne    114e <main+0x2e>
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1f90,%edi
call   1030 <creer_serveur@plt>
cmp    $0xffffffff,%eax
je     1137 <main+0x17>
mov    $0x1,%eax
pop    %rcx
ret
lea    0xec2(%rip),%rdi
call   1040 <perror@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [19 x i8] c"creer_serveur_main\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @creer_serveur(i32 8080)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 1
}

LLVM IR (-O2):
@.str = [19 x i8] c"creer_serveur_main\00"
define i32 @main() {
%1 = tail call i32 @creer_serveur(i32 8080)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Error(char *, int);
void AssertFailed() { Error("assert failed", 819); }


x86 assembly (clang, -O0):
<AssertFailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x333,%esi
call   1030 <Error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AssertFailed>:
lea    0xee9(%rip),%rdi
mov    $0x333,%esi
jmp    1030 <Error@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"assert failed\00"
define void @AssertFailed() {
%1 = call i32 @Error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 819)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"assert failed\00"
define void @AssertFailed() {
%1 = tail call i32 @Error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 819)
ret void
}
int clamp(int min, int val, int max) {
  return val < min ? min : (val > max ? max : val);
}


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

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

LLVM IR (-O0):
define i32 @clamp(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* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32, i32* %4
br label %22
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i32, i32* %6
br label %20
18: ; preds = %12
%19 = load i32, i32* %5
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i32 [ %11, %10 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @clamp(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %0
%5 = icmp sgt i32 %1, %2
%6 = select i1 %5, i32 %2, i32 %1
%7 = select i1 %4, i32 %0, i32 %6
ret i32 %7
}
int test_imm_59int16_reg(short val) {
  return ((val) & (0x59 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_59int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x59,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_59int16_reg>:
test   $0x59,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_59int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 89
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_59int16_reg(i16 signext %0) {
%2 = and i16 %0, 89
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void xinput_input_free_input(void *data) { (void)data; }


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

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

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

LLVM IR (-O2):
define void @xinput_input_free_input(i8* nocapture %0) {
ret void
}
int int_max(int x, int y) { return ((x < y) ? y : x); }


x86 assembly (clang, -O0):
<int_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <int_max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <int_max+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @int_max(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @int_max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
bool USBLPMRemoteWakeEnabled(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  if ((*((volatile uint16_t *)(ui32Base + 0x00000360))) & 0x00000100) {
    return (true);
  }
  return (false);
}


x86 assembly (clang, -O0):
<USBLPMRemoteWakeEnabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x40050000,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%eax
add    $0x360,%eax
cltq
mov    (%rax),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     1155 <USBLPMRemoteWakeEnabled+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <USBLPMRemoteWakeEnabled+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBLPMRemoteWakeEnabled>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
mov    0x360(%rax),%eax
shr    $0x8,%eax
and    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @USBLPMRemoteWakeEnabled(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1074069504
%6 = zext i1 %5 to i32
%7 = call i32 @ASSERT(i32 %6)
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 864
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, 256
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %1
store i32 1, i32* %2
br label %17
16: ; preds = %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @USBLPMRemoteWakeEnabled(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 864
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = lshr i32 %8, 8
%10 = and i32 %9, 1
ret i32 %10
}
void ff_hevc_put_hevc_bi_w_epel_h24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_h24_10_sse4() {
ret void
}
int length_of(char s[]) {
  int i;
  for (i = 0; s[i] != '\0'; ++i)
    ;
  return i;
}


x86 assembly (clang, -O0):
<length_of>:
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     1137 <length_of+0x37>
jmp    1129 <length_of+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <length_of+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @length_of(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %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 %16
12: ; preds = %4
br label %13
13: ; preds = %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @length_of(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
}
/* Variables and functions */
int /*<<< orphan*/ cont(int, int);
int /*<<< orphan*/ move_nasko(int, int);
int point(int x, int y) {
  move_nasko(x, y);
  cont(x, y);
  return 0;
}


x86 assembly (clang, -O0):
<point>:
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 <move_nasko@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <cont@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<point>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <move_nasko@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <cont@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @point(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 @move_nasko(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @cont(i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @point(i32 %0, i32 %1) {
%3 = tail call i32 @move_nasko(i32 %0, i32 %1)
%4 = tail call i32 @cont(i32 %0, i32 %1)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ rm_so;
  scalar_t__ rm_eo;
};
typedef TYPE_1__ regmatch_t;

/* Variables and functions */
int regexSubstrMatched(const regmatch_t substr) {
  return (substr.rm_so >= 0 && substr.rm_eo >= 0 &&
          substr.rm_eo >= substr.rm_so);
}


x86 assembly (clang, -O0):
<regexSubstrMatched>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jl     113a <regexSubstrMatched+0x3a>
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jl     113a <regexSubstrMatched+0x3a>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regexSubstrMatched>:
mov    %rdi,%rax
or     %rsi,%rax
setns  %al
cmp    %rdi,%rsi
setge  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define i32 @regexSubstrMatched(i64 %0, i64 %1) {
%3 = alloca %struct.TYPE_3__
%4 = bitcast %struct.TYPE_3__* %3 to { i64, i64 }*
%5 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 0
store i64 %0, i64* %5
%6 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %4, i32 0, i32 1
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%8 = load i64, i64* %7
%9 = icmp sge i64 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %2
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
%12 = load i64, i64* %11
%13 = icmp sge i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
%16 = load i64, i64* %15
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%18 = load i64, i64* %17
%19 = icmp sge i64 %16, %18
br label %20
20: ; preds = %14, %10, %2
%21 = phi i1 [ false, %10 ], [ false, %2 ], [ %19, %14 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @regexSubstrMatched(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, -1
%4 = icmp sgt i64 %1, -1
%5 = select i1 %3, i1 %4, i1 false
%6 = icmp sge i64 %1, %0
%7 = select i1 %5, i1 %6, i1 false
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strcmp(int /*<<< orphan*/, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strtok(char *, char *);
void assert_exit(char *cmd) {
  char temp[1024] = "";
  strcpy(temp, cmd);
  if (!strcmp(strtok(temp, " "), "exit"))
    exit(0);
}


x86 assembly (clang, -O0):
<assert_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x410(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1060 <strtok@plt>
mov    %eax,%edi
lea    0xe64(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11b3 <assert_exit+0x63>
xor    %edi,%edi
call   1070 <exit@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_exit>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    $0x400,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xe7f(%rip),%rsi
mov    %r14,%rdi
call   1060 <strtok@plt>
lea    0xe72(%rip),%rsi
mov    %eax,%edi
call   1050 <strcmp@plt>
test   %eax,%eax
je     11a6 <assert_exit+0x56>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c"exit\00"
define void @assert_exit(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = bitcast [1024 x i8]* %3 to i8*
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @strcpy(i8* %5, i8* %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i32 @strtok(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @strcmp(i32 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %1
%13 = call i32 @exit(i32 0)
unreachable
14: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [5 x i8] c"exit\00"
define void @assert_exit(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
%5 = call i32 @strtok(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @strcmp(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %1
ret void
}
void Sys_HighFPPrecision(void) {}


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

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

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

LLVM IR (-O2):
define void @Sys_HighFPPrecision() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() {
  printf("*******\n");
  printf("*\n");
  printf("*\n");
  printf("*\n");
  printf("*\n");
  printf("*******\n");
}


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

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"*******\0A\00"
@.str.1 = [3 x i8] c"*\0A\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str.5 = [2 x i8] c"*\00"
@str.6 = [8 x i8] c"*******\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.6, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ stdout;
int log_error(int farray, char *msg) {
  char *err, *mesg;
  char buffer[24];
  memset(buffer, 0x00, sizeof(buffer));
  sprintf(buffer, "Error: %s", mesg);
  fprintf(stdout, "%s\n", buffer);
  return 0;
}


x86 assembly (clang, -O0):
<log_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xea2(%rip),%rsi
call   1050 <sprintf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    -0x40(%rbp),%rdx
lea    0xe93(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_error>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Error: %s\00"
@stdout = global i32 0
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @log_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [24 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
%8 = getelementptr inbounds [24 x i8], [24 x i8]* %7, i64 0, i64 0
%9 = call i32 @memset(i8* %8, i32 0, i32 24)
%10 = getelementptr inbounds [24 x i8], [24 x i8]* %7, i64 0, i64 0
%11 = load i8*, i8** %6
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @stdout
%14 = getelementptr inbounds [24 x i8], [24 x i8]* %7, i64 0, i64 0
%15 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Error: %s\00"
@stdout = global i32 0
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @log_error(i32 %0, i8* nocapture readnone %1) {
%3 = alloca [24 x i8]
%4 = getelementptr inbounds [24 x i8], [24 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 24)
%6 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* undef)
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
void pthread_condattr_init() {}


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

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

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

LLVM IR (-O2):
define void @pthread_condattr_init() {
ret void
}