xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(void) {
  while (1) {
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @sleep(i32 1)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @sleep(i32 1)
br label %1
}
/* Type definitions */
typedef int uint8_t;
typedef int int16_t;

/* Variables and functions */
int16_t comp_decode(uint8_t usample) {
  usample = ~usample;
  int sign = usample & 0x80;
  int exp = (usample >> 4) & 7;
  int16_t sample = ((((usample & 0xF) << 1) | 0x21) << exp) - 33;
  if (sign)
    return -sample;
  else
    return sample;
}


x86 assembly (clang, -O0):
<comp_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x80,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x4,%eax
and    $0x7,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
shl    $0x1,%eax
or     $0x21,%eax
mov    -0x10(%rbp),%ecx
shl    %cl,%eax
sub    $0x21,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1155 <comp_decode+0x55>
xor    %eax,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <comp_decode+0x5b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_decode>:
not    %edi
mov    %edi,%eax
and    $0xf,%eax
add    %eax,%eax
add    $0x21,%eax
mov    %edi,%ecx
shr    $0x4,%cl
and    $0x7,%cl
shl    %cl,%eax
mov    $0x21,%ecx
sub    %eax,%ecx
add    $0xffffffdf,%eax
test   $0x80,%dil
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comp_decode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
%7 = load i32, i32* %3
%8 = xor i32 %7, -1
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = and i32 %9, 128
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = ashr i32 %11, 4
%13 = and i32 %12, 7
store i32 %13, i32* %5
%14 = load i32, i32* %3
%15 = and i32 %14, 15
%16 = shl i32 %15, 1
%17 = or i32 %16, 33
%18 = load i32, i32* %5
%19 = shl i32 %17, %18
%20 = sub nsw i32 %19, 33
store i32 %20, i32* %6
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %1
%24 = load i32, i32* %6
%25 = sub nsw i32 0, %24
store i32 %25, i32* %2
br label %28
26: ; preds = %1
%27 = load i32, i32* %6
store i32 %27, i32* %2
br label %28
28: ; preds = %26, %23
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @comp_decode(i32 %0) {
%2 = xor i32 %0, -1
%3 = and i32 %2, 128
%4 = lshr i32 %2, 4
%5 = and i32 %4, 7
%6 = shl i32 %2, 1
%7 = and i32 %6, 30
%8 = or i32 %7, 33
%9 = shl i32 %8, %5
%10 = icmp eq i32 %3, 0
%11 = sub nsw i32 33, %9
%12 = add nsw i32 %9, -33
%13 = select i1 %10, i32 %12, i32 %11
ret i32 %13
}
/* Variables and functions */
scalar_t__ qe_inrange(int, char, char);
int qe_isalnum_(int c) {
  return (qe_inrange(c, '0', '9') || qe_inrange(c | ('a' - 'A'), 'a', 'z') ||
          c == '_');
}


x86 assembly (clang, -O0):
<qe_isalnum_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <qe_inrange@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1170 <qe_isalnum_+0x60>
mov    -0x4(%rbp),%edi
or     $0x20,%edi
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <qe_inrange@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1170 <qe_isalnum_+0x60>
cmpl   $0x5f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qe_isalnum_>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <qe_inrange@plt>
mov    $0x1,%ebp
test   %rax,%rax
jne    1150 <qe_isalnum_+0x40>
mov    %ebx,%edi
or     $0x20,%edi
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <qe_inrange@plt>
test   %rax,%rax
jne    1150 <qe_isalnum_+0x40>
xor    %ebp,%ebp
cmp    $0x5f,%ebx
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @qe_isalnum_(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @qe_inrange(i32 %3, i8 signext 48, i8 signext 57)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, 32
%9 = call i64 @qe_inrange(i32 %8, i8 signext 97, i8 signext 122)
%10 = icmp ne i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 95
br label %14
14: ; preds = %11, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @qe_isalnum_(i32 %0) {
%2 = tail call i64 @qe_inrange(i32 %0, i8 signext 48, i8 signext 57)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = or i32 %0, 32
%6 = tail call i64 @qe_inrange(i32 %5, i8 signext 97, i8 signext 122)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = icmp eq i32 %0, 95
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %8, %4, %1
%12 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %10, %8 ]
ret i32 %12
}
/* Type definitions */
struct ifaddrs {
  int /*<<< orphan*/ ifa_dstaddr;
  int /*<<< orphan*/ ifa_name;
  int /*<<< orphan*/ ifa_addr;
};

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
void free_local(struct ifaddrs *ifa) {
  free(ifa->ifa_addr);
  free(ifa->ifa_name);
  free(ifa->ifa_dstaddr);
}


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

x86 assembly (clang, -O2):
<free_local>:
push   %rbx
mov    %rdi,%rbx
mov    0x8(%rdi),%edi
call   1030 <free@plt>
mov    0x4(%rbx),%edi
call   1030 <free@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ifaddrs = type { i32, i32, i32 }
define void @free_local(%struct.ifaddrs* %0) {
%2 = alloca %struct.ifaddrs*
store %struct.ifaddrs* %0, %struct.ifaddrs** %2
%3 = load %struct.ifaddrs*, %struct.ifaddrs** %2
%4 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %3, i32 0, i32 2
%5 = load i32, i32* %4
%6 = call i32 @free(i32 %5)
%7 = load %struct.ifaddrs*, %struct.ifaddrs** %2
%8 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %7, i32 0, i32 1
%9 = load i32, i32* %8
%10 = call i32 @free(i32 %9)
%11 = load %struct.ifaddrs*, %struct.ifaddrs** %2
%12 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = call i32 @free(i32 %13)
ret void
}

LLVM IR (-O2):
%struct.ifaddrs = type { i32, i32, i32 }
define void @free_local(%struct.ifaddrs* nocapture %0) {
%2 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %0, i64 0, i32 2
%3 = load i32, i32* %2
%4 = tail call i32 @free(i32 %3)
%5 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %0, i64 0, i32 1
%6 = load i32, i32* %5
%7 = tail call i32 @free(i32 %6)
%8 = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs* %0, i64 0, i32 0
%9 = load i32, i32* %8
%10 = tail call i32 @free(i32 %9)
ret void
}
void foo_1_1_1_1_1_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_1_1_1_2_2_2() {
ret void
}
int badmark(c)
int c;
{
  if (c < 'a' || c > 'z') {
    error("Choose a letter between 'a' and 'z'");
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<badmark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     112f <badmark+0x1f>
cmpl   $0x7a,-0x8(%rbp)
jle    1149 <badmark+0x39>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
movl   $0x1,-0x4(%rbp)
jmp    1150 <badmark+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<badmark>:
add    $0xffffff85,%edi
xor    %eax,%eax
cmp    $0xffffffe5,%edi
ja     1132 <badmark+0x22>
push   %rax
lea    0xede(%rip),%rdi
xor    %eax,%eax
call   1030 <error@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Choose a letter between 'a' and 'z'\00"
define i32 @badmark(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 97
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 122
br i1 %8, label %9, label %11
9: ; preds = %6, %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %12
11: ; preds = %6
store i32 0, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [36 x i8] c"Choose a letter between 'a' and 'z'\00"
define i32 @badmark(i32 %0) {
%2 = add i32 %0, -123
%3 = icmp ult i32 %2, -26
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sched_getcpu();
void *main_thread(void *arg) {
  (void)arg;
  printf("%d\n", sched_getcpu());
  return NULL;
}


x86 assembly (clang, -O0):
<main_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <sched_getcpu@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_thread>:
push   %rax
xor    %eax,%eax
call   1040 <sched_getcpu@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i8* @main_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @sched_getcpu()
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* null
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define noalias i8* @main_thread(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @sched_getcpu()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ LCD_FB_Clear();
int /*<<< orphan*/ LCD_FB_Update();
int /*<<< orphan*/ LCD_SetBacklight(int);
int /*<<< orphan*/ LCD_WriteCmd(int);
void LCD_Init(void) {
  (*(volatile unsigned long *)(0x3FFFC000 + 0x20)) = 0xff0000;
  LCD_WriteCmd((0x3f));
  LCD_WriteCmd((0xb8));
  LCD_WriteCmd((0x40));
  LCD_WriteCmd((0xc0));
  LCD_FB_Clear();
  LCD_FB_Update();
  LCD_SetBacklight(1);
}


x86 assembly (clang, -O0):
<LCD_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3fffc020,%eax
movq   $0xff0000,(%rax)
mov    $0x3f,%edi
call   1060 <LCD_WriteCmd@plt>
mov    $0xb8,%edi
call   1060 <LCD_WriteCmd@plt>
mov    $0x40,%edi
call   1060 <LCD_WriteCmd@plt>
mov    $0xc0,%edi
call   1060 <LCD_WriteCmd@plt>
mov    $0x0,%al
call   1050 <LCD_FB_Clear@plt>
mov    $0x0,%al
call   1040 <LCD_FB_Update@plt>
mov    $0x1,%edi
call   1030 <LCD_SetBacklight@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_Init>:
push   %rax
movq   $0xff0000,0x3fffc020
mov    $0x3f,%edi
call   1060 <LCD_WriteCmd@plt>
mov    $0xb8,%edi
call   1060 <LCD_WriteCmd@plt>
mov    $0x40,%edi
call   1060 <LCD_WriteCmd@plt>
mov    $0xc0,%edi
call   1060 <LCD_WriteCmd@plt>
xor    %eax,%eax
call   1050 <LCD_FB_Clear@plt>
xor    %eax,%eax
call   1040 <LCD_FB_Update@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <LCD_SetBacklight@plt>

LLVM IR (-O0):
define void @LCD_Init() {
store volatile i64 16711680, i64* inttoptr (i64 1073725472 to i64*)
%1 = call i32 @LCD_WriteCmd(i32 63)
%2 = call i32 @LCD_WriteCmd(i32 184)
%3 = call i32 @LCD_WriteCmd(i32 64)
%4 = call i32 @LCD_WriteCmd(i32 192)
%5 = call i32 (...) @LCD_FB_Clear()
%6 = call i32 (...) @LCD_FB_Update()
%7 = call i32 @LCD_SetBacklight(i32 1)
ret void
}

LLVM IR (-O2):
define void @LCD_Init() {
store volatile i64 16711680, i64* inttoptr (i64 1073725472 to i64*)
%1 = tail call i32 @LCD_WriteCmd(i32 63)
%2 = tail call i32 @LCD_WriteCmd(i32 184)
%3 = tail call i32 @LCD_WriteCmd(i32 64)
%4 = tail call i32 @LCD_WriteCmd(i32 192)
%5 = tail call i32 (...) @LCD_FB_Clear()
%6 = tail call i32 (...) @LCD_FB_Update()
%7 = tail call i32 @LCD_SetBacklight(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char *s = (char *)malloc(5);
  strcpy(s, "Linkerist Heracles");
  func(s);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1050 <func@plt>
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <func@plt>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Linkerist Heracles\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 5)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @func(i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Linkerist Heracles\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 5)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @func(i8* %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
__attribute__((no)) unsigned int rosbg_si_srl(unsigned int a, unsigned int b) {
  return a | (b >> 2);
}


x86 assembly (clang, -O0):
<rosbg_si_srl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    $0x2,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rosbg_si_srl>:
mov    %esi,%eax
shr    $0x2,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rosbg_si_srl(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 = lshr i32 %6, 2
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @rosbg_si_srl(i32 %0, i32 %1) {
%3 = lshr i32 %1, 2
%4 = or i32 %3, %0
ret i32 %4
}
IR0A1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (*p0) = (*((float *)11111111)); }


x86 assembly (clang, -O0):
<IR0A1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    $0xa98ac7,%eax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0A1>:
movss  0xa98ac7,%xmm0
movss  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define i32 @IR0A1(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float, float* inttoptr (i64 11111111 to float*)
%17 = load float*, float** %12
store float %16, float* %17
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @IR0A1(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture readnone %5) {
%7 = load float, float* inttoptr (i64 11111111 to float*)
store float %7, float* %4
ret i32 undef
}
unsigned int get_721(void *pnt) {
  unsigned char *p = (unsigned char *)pnt;
  return ((unsigned int)p[0]) + ((unsigned int)p[1] << 8);
}


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

x86 assembly (clang, -O2):
<get_721>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_721(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = add i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_721(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
int odd_ones(unsigned x) {
  unsigned p16 = (x >> 16) ^ x;
  unsigned p8 = (p16 >> 8) ^ p16;
  unsigned p4 = (p8 >> 4) ^ p8;
  unsigned p2 = (p4 >> 2) ^ p4;
  unsigned p1 = (p2 >> 1) ^ p2;
  return p1 & 1;
}


x86 assembly (clang, -O0):
<odd_ones>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x4,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x2,%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x1,%eax
xor    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odd_ones>:
mov    %edi,%eax
shr    $0x10,%eax
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
xor    %ecx,%eax
mov    %eax,%ecx
shr    $0x2,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    %eax
xor    %ecx,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @odd_ones(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %2
%8 = load i32, i32* %2
%9 = lshr i32 %8, 16
%10 = load i32, i32* %2
%11 = xor i32 %9, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = lshr i32 %12, 8
%14 = load i32, i32* %3
%15 = xor i32 %13, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = lshr i32 %16, 4
%18 = load i32, i32* %4
%19 = xor i32 %17, %18
store i32 %19, i32* %5
%20 = load i32, i32* %5
%21 = lshr i32 %20, 2
%22 = load i32, i32* %5
%23 = xor i32 %21, %22
store i32 %23, i32* %6
%24 = load i32, i32* %6
%25 = lshr i32 %24, 1
%26 = load i32, i32* %6
%27 = xor i32 %25, %26
store i32 %27, i32* %7
%28 = load i32, i32* %7
%29 = and i32 %28, 1
ret i32 %29
}

LLVM IR (-O2):
define i32 @odd_ones(i32 %0) {
%2 = lshr i32 %0, 16
%3 = xor i32 %2, %0
%4 = lshr i32 %3, 8
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 4
%7 = xor i32 %6, %5
%8 = lshr i32 %7, 2
%9 = xor i32 %8, %7
%10 = lshr i32 %9, 1
%11 = xor i32 %10, %9
%12 = and i32 %11, 1
ret i32 %12
}
/* Variables and functions */
unsigned char *malloc(size_t);
int /*<<< orphan*/ memset(unsigned char *, int, size_t);
unsigned char *fs_new_bit_array(long n) {
  int extra = (n % 8) ? 1 : 0;
  size_t ms = ((n / 8) + extra) * sizeof(unsigned char);
  unsigned char *p = malloc(ms);
  memset(p, 0xFF, ms);
  return p;
}


x86 assembly (clang, -O0):
<fs_new_bit_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x8,%ecx
cqto
idiv   %rcx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x8,%ecx
cqto
idiv   %rcx
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
shl    $0x0,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_new_bit_array>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%eax
and    $0x7,%eax
lea    0x7(%rdi),%rbx
test   %rdi,%rdi
cmovns %rdi,%rbx
sar    $0x3,%rbx
cmp    $0x1,%rax
sbb    $0xffffffffffffffff,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    $0xff,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @fs_new_bit_array(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = srem i64 %6, 8
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
store i32 %10, i32* %3
%11 = load i64, i64* %2
%12 = sdiv i64 %11, 8
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = add nsw i64 %12, %14
%16 = mul i64 %15, 1
store i64 %16, i64* %4
%17 = load i64, i64* %4
%18 = call i8* @malloc(i64 %17)
store i8* %18, i8** %5
%19 = load i8*, i8** %5
%20 = load i64, i64* %4
%21 = call i32 @memset(i8* %19, i32 255, i64 %20)
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
define i8* @fs_new_bit_array(i64 %0) {
%2 = and i64 %0, 7
%3 = icmp ne i64 %2, 0
%4 = sdiv i64 %0, 8
%5 = zext i1 %3 to i64
%6 = add nsw i64 %4, %5
%7 = tail call i8* @malloc(i64 %6)
%8 = tail call i32 @memset(i8* %7, i32 255, i64 %6)
ret i8* %7
}
void switch_set_state(struct switch_dev *sdev, int state) { return; }


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

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

LLVM IR (-O0):
%struct.switch_dev = type opaque
define void @switch_set_state(%struct.switch_dev* %0, i32 %1) {
%3 = alloca %struct.switch_dev*
%4 = alloca i32
store %struct.switch_dev* %0, %struct.switch_dev** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.switch_dev = type opaque
define void @switch_set_state(%struct.switch_dev* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ xxswap4(float *, int, int);
void print_int(char *buf, char *c, int bigendian) {
  int *i4;
  i4 = (int *)c;
  if (bigendian)
    xxswap4((float *)i4, 1, 1);
  sprintf(buf, "%d", *i4);
}


x86 assembly (clang, -O0):
<print_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1155 <print_int+0x35>
mov    -0x20(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <xxswap4@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xe9a(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
test   %edx,%edx
je     1140 <print_int+0x20>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <xxswap4@plt>
mov    (%rbx),%edx
lea    0xeb7(%rip),%rsi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @print_int(i8* nocapture writeonly %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = bitcast i8* %1 to float*
%7 = tail call i32 @xxswap4(float* %6, i32 1, i32 1)
br label %8
8: ; preds = %5, %3
%9 = bitcast i8* %1 to i32*
%10 = load i32, i32* %9
%11 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printMatrix(int *, int, int);
void printMatrices(int *first, int *second, int *third, int M, int N, int K) {
  printMatrix(first, M, N);
  printMatrix(second, N, K);
  printMatrix(third, M, K);
}


x86 assembly (clang, -O0):
<printMatrices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1030 <printMatrix@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1030 <printMatrix@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1030 <printMatrix@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMatrices>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r9d,%r14d
mov    %r8d,%ebp
mov    %ecx,%ebx
mov    %rdx,%r15
mov    %rsi,%r12
mov    %ecx,%esi
mov    %r8d,%edx
call   1030 <printMatrix@plt>
mov    %r12,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <printMatrix@plt>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printMatrix@plt>

LLVM IR (-O0):
define void @printMatrices(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %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
%13 = load i32*, i32** %7
%14 = load i32, i32* %10
%15 = load i32, i32* %11
%16 = call i32 @printMatrix(i32* %13, i32 %14, i32 %15)
%17 = load i32*, i32** %8
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = call i32 @printMatrix(i32* %17, i32 %18, i32 %19)
%21 = load i32*, i32** %9
%22 = load i32, i32* %10
%23 = load i32, i32* %12
%24 = call i32 @printMatrix(i32* %21, i32 %22, i32 %23)
ret void
}

LLVM IR (-O2):
define void @printMatrices(i32* %0, i32* %1, i32* %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @printMatrix(i32* %0, i32 %3, i32 %4)
%8 = tail call i32 @printMatrix(i32* %1, i32 %4, i32 %5)
%9 = tail call i32 @printMatrix(i32* %2, i32 %3, i32 %5)
ret void
}
/* Variables and functions */
int sscanf(char *, char *, unsigned long *);
int strlen(char const *);
char *strstr(char const *, char const *);
void scan_one(const char *buff, const char *key, unsigned long int *val) {
  int o;
  char *b = strstr(buff, key);
  if (b)
    o = sscanf(b + strlen(key), ": %lu", val);
}


x86 assembly (clang, -O0):
<scan_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strstr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     118d <scan_one+0x5d>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x18(%rbp),%rdx
lea    0xe7b(%rip),%rsi
call   1040 <sscanf@plt>
mov    %eax,-0x1c(%rbp)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_one>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
call   1050 <strstr@plt>
test   %rax,%rax
je     116c <scan_one+0x3c>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
add    %rax,%rbx
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <sscanf@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c": %lu\00"
define void @scan_one(i8* %0, i8* %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64* %2, i64** %6
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i8* @strstr(i8* %9, i8* %10)
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %22
14: ; preds = %3
%15 = load i8*, i8** %8
%16 = load i8*, i8** %5
%17 = call i32 @strlen(i8* %16)
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
%20 = load i64*, i64** %6
%21 = call i32 @sscanf(i8* %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64* %20)
store i32 %21, i32* %7
br label %22
22: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c": %lu\00"
define void @scan_one(i8* %0, i8* %1, i64* %2) {
%4 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = tail call i32 @strlen(i8* %1)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
%10 = tail call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64* %2)
br label %11
11: ; preds = %6, %3
ret void
}
/* Variables and functions */
bool is_leap_year(int yy) {
  int yyyy = yy + 1900;
  if (yyyy % 100 == 0) {
    return yyyy % 400 == 0;
  }
  return yyyy % 4 == 0;
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x76c,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1144 <is_leap_year+0x44>
mov    -0xc(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    115d <is_leap_year+0x5d>
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
lea    0x76c(%rdi),%ecx
imul   $0xc28f5c29,%ecx,%eax
add    $0x51eb850,%eax
ror    $0x2,%eax
cmp    $0x28f5c28,%eax
jbe    1122 <is_leap_year+0x22>
and    $0x3,%edi
mov    %edi,%ecx
jmp    1141 <is_leap_year+0x41>
movslq %ecx,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x27,%rax
add    %edx,%eax
imul   $0x190,%eax,%eax
sub    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_leap_year(i32 %0) {
%2 = add nsw i32 %0, 1900
%3 = srem i32 %2, 100
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = srem i32 %2, 400
br label %9
7: ; preds = %1
%8 = and i32 %0, 3
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
void movvv(float *dest, const float *src) {
  dest[0] = src[0];
  dest[1] = src[1];
  dest[2] = src[2];
}


x86 assembly (clang, -O0):
<movvv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<movvv>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @movvv(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
store float %7, float* %9
%10 = load float*, float** %4
%11 = getelementptr inbounds float, float* %10, i64 1
%12 = load float, float* %11
%13 = load float*, float** %3
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float*, float** %4
%16 = getelementptr inbounds float, float* %15, i64 2
%17 = load float, float* %16
%18 = load float*, float** %3
%19 = getelementptr inbounds float, float* %18, i64 2
store float %17, float* %19
ret void
}

LLVM IR (-O2):
define void @movvv(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
store float %3, float* %0
%4 = getelementptr inbounds float, float* %1, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %0, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %1, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %0, i64 2
store float %8, float* %9
ret void
}
/* Variables and functions */
scalar_t__ isinf(float);
scalar_t__ isnan(float);
double check_nan(double number) {
  if (isnan((float)number) || isinf((float)number))
    return 0.0;
  return number;
}


x86 assembly (clang, -O0):
<check_nan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    115d <check_nan+0x3d>
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <isinf@plt>
cmp    $0x0,%rax
je     116a <check_nan+0x4a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1174 <check_nan+0x54>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_nan>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
call   1030 <isnan@plt>
xorps  %xmm0,%xmm0
test   %rax,%rax
je     1146 <check_nan+0x26>
add    $0x18,%rsp
ret
movss  0xc(%rsp),%xmm0
call   1040 <isinf@plt>
test   %rax,%rax
movsd  0x10(%rsp),%xmm0
je     1141 <check_nan+0x21>
xorps  %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @check_nan(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fptrunc double %4 to float
%6 = call i64 @isnan(float %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load double, double* %3
%10 = fptrunc double %9 to float
%11 = call i64 @isinf(float %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8, %1
store double 0.000000e+00, double* %2
br label %16
14: ; preds = %8
%15 = load double, double* %3
store double %15, double* %2
br label %16
16: ; preds = %14, %13
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @check_nan(double %0) {
%2 = fptrunc double %0 to float
%3 = tail call i64 @isnan(float %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = tail call i64 @isinf(float %2)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, double %0, double 0.000000e+00
br label %9
9: ; preds = %5, %1
%10 = phi double [ 0.000000e+00, %1 ], [ %8, %5 ]
ret double %10
}
void XChangePointerControl() {}


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

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

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

LLVM IR (-O2):
define void @XChangePointerControl() {
ret void
}
int av_clip(int a, int amin, int amax) {
  if (a < amin)
    return amin;
  else if (a > amax)
    return amax;
  else
    return a;
}


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

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

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

LLVM IR (-O2):
define i32 @av_clip(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double);
int /*<<< orphan*/ stderr;
void prtreal(double val) { fprintf(stderr, " %15.3g ", val); }


x86 assembly (clang, -O0):
<prtreal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
movsd  -0x8(%rbp),%xmm0
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prtreal>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c" %15.3g \00"
define void @prtreal(double %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t __rleu32(uint8_t *buffer) {
  return ((uint32_t)buffer[3] << 24) | ((uint32_t)buffer[2] << 16) |
         ((uint32_t)buffer[1] << 8) | ((uint32_t)buffer[0] << 0);
}


x86 assembly (clang, -O0):
<__rleu32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rleu32>:
mov    0x18(%rdi),%ecx
shl    $0x18,%ecx
mov    0x8(%rdi),%eax
mov    0x10(%rdi),%edx
shl    $0x10,%edx
or     %ecx,%edx
shl    $0x8,%eax
or     %edx,%eax
or     (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @__rleu32(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 3
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 24
%6 = getelementptr inbounds i64, i64* %0, i64 2
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 16
%10 = or i32 %9, %5
%11 = getelementptr inbounds i64, i64* %0, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 8
%15 = or i32 %10, %14
%16 = load i64, i64* %0
%17 = trunc i64 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ _Init();
void SEGGER_RTT_Init(void) { _Init(); }


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

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

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

LLVM IR (-O2):
define void @SEGGER_RTT_Init() {
%1 = tail call i32 (...) @_Init()
ret void
}
/* Type definitions */
struct input_event {
  int type;
  unsigned int code;
};

/* Variables and functions */
#define EV_ABS 130
#define EV_KEY 129
#define EV_REL 128
unsigned int translate_event(const struct input_event *levt) {
  switch (levt->type) {
  case EV_KEY:
    return levt->code;
  case EV_REL:
  case EV_ABS:
  default:
    break;
    ;
  }
  return -1;
}


x86 assembly (clang, -O0):
<translate_event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x80,%eax
je     1156 <translate_event+0x56>
jmp    1121 <translate_event+0x21>
mov    -0x14(%rbp),%eax
sub    $0x81,%eax
je     1147 <translate_event+0x47>
jmp    1134 <translate_event+0x34>
mov    -0x14(%rbp),%eax
sub    $0x82,%eax
je     1156 <translate_event+0x56>
jmp    115b <translate_event+0x5b>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <translate_event+0x67>
jmp    115b <translate_event+0x5b>
jmp    1160 <translate_event+0x60>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_event>:
mov    $0xffffffff,%eax
cmpl   $0x81,(%rdi)
jne    1110 <translate_event+0x10>
mov    0x4(%rdi),%eax
ret

LLVM IR (-O0):
%struct.input_event = type { i32, i32 }
define i32 @translate_event(%struct.input_event* %0) {
%2 = alloca i32
%3 = alloca %struct.input_event*
store %struct.input_event* %0, %struct.input_event** %3
%4 = load %struct.input_event*, %struct.input_event** %3
%5 = getelementptr inbounds %struct.input_event, %struct.input_event* %4, i32 0, i32 0
%6 = load i32, i32* %5
switch i32 %6, label %12 [
i32 129, label %7
i32 128, label %11
i32 130, label %11
]
7: ; preds = %1
%8 = load %struct.input_event*, %struct.input_event** %3
%9 = getelementptr inbounds %struct.input_event, %struct.input_event* %8, i32 0, i32 1
%10 = load i32, i32* %9
store i32 %10, i32* %2
br label %14
11: ; preds = %1, %1
br label %12
12: ; preds = %1, %11
br label %13
13: ; preds = %12
store i32 -1, i32* %2
br label %14
14: ; preds = %13, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.input_event = type { i32, i32 }
define i32 @translate_event(%struct.input_event* nocapture %0) {
%2 = getelementptr inbounds %struct.input_event, %struct.input_event* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 129
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = getelementptr inbounds %struct.input_event, %struct.input_event* %0, i64 0, i32 1
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ %7, %5 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x3a() {
  Assert_real((islower(58) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              295, ("islower should be 0 for :"));
}


x86 assembly (clang, -O0):
<t_islower_0x3a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3a,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x127,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x3a>:
push   %rax
mov    $0x3a,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x127,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for :\00"
define void @t_islower_0x3a() {
%1 = call i64 @islower(i32 58)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 295, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for :\00"
define void @t_islower_0x3a() {
%1 = tail call i64 @islower(i32 58)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 295, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}