xunge/DecIR huggingface dataset:
void rop3_70_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T & *D;
  stk2 = S | stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_70_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_70_1_0>:
mov    (%rdi),%al
and    %al,%dl
or     %sil,%dl
xor    %al,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_70_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = and i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
store i8 %43, i8* %44
ret void
}

LLVM IR (-O2):
define void @rop3_70_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %6, %4
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %4, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main() {
  setuid(0);
  system("sudo apt-get update");
  system("sudo apt-get upgrade");
  system("sudo apt-get autoremove");
  system("sudo apt-get autoclean");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xec3(%rip),%rdi
call   1030 <system@plt>
lea    0xecb(%rip),%rdi
call   1030 <system@plt>
lea    0xed4(%rip),%rdi
call   1030 <system@plt>
lea    0xee0(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
lea    0xed9(%rip),%rdi
call   1030 <system@plt>
lea    0xee2(%rip),%rdi
call   1030 <system@plt>
lea    0xeee(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"sudo apt-get update\00"
@.str.1 = [21 x i8] c"sudo apt-get upgrade\00"
@.str.2 = [24 x i8] c"sudo apt-get autoremove\00"
@.str.3 = [23 x i8] c"sudo apt-get autoclean\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @setuid(i32 0)
%3 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"sudo apt-get update\00"
@.str.1 = [21 x i8] c"sudo apt-get upgrade\00"
@.str.2 = [24 x i8] c"sudo apt-get autoremove\00"
@.str.3 = [23 x i8] c"sudo apt-get autoclean\00"
define i32 @main() {
%1 = tail call i32 @setuid(i32 0)
%2 = tail call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
void _M2_polar_finish(__attribute__((unused)) int argc,
                      __attribute__((unused)) char *argv[]) {}


x86 assembly (clang, -O0):
<_M2_polar_finish>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @_M2_polar_finish(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int parse_file(char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  if (argc != 2) {
    usage(argv[0]);
    return 1;
  }
  return parse_file(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1158 <main+0x38>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    1168 <main+0x48>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <parse_file@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1130 <main+0x10>
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1040 <parse_file@plt>
mov    (%rsi),%rdi
call   1030 <usage@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @parse_file(i8* %9)
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
main() {
  printf("Soy el proceso %d\n", getpid());
  sleep(200);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
mov    $0xc8,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xc8,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Soy el proceso %d\0A\00"
define i32 @main() {
%1 = call i32 (...) @getpid()
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @sleep(i32 200)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Soy el proceso %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @sleep(i32 200)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void *printer1(void *ptr) {
  char *thread = (char *)ptr;
  printf("%s: %d\n", thread, 3 + 3);
}


x86 assembly (clang, -O0):
<printer1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xed1(%rip),%rdi
mov    $0x6,%edx
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printer1>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0x6,%edx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %d\0A\00"
define noalias i8* @printer1(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i32 6)
ret i8* undef
}
void dec_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) {}


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

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

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

LLVM IR (-O2):
%struct.sched_rt_entity = type opaque
%struct.rt_rq = type opaque
define void @dec_rt_migration(%struct.sched_rt_entity* nocapture %0, %struct.rt_rq* nocapture %1) {
ret void
}
int execute_fdatasync() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_fdatasync() {
ret i32 0
}
/* Type definitions */
struct tit {
  int dummy;
};
struct node {
  int dummy;
};

/* Variables and functions */
struct node const *tit_node_ignore_any_overlay(struct tit const *);
const struct node *tit_for_error(const struct tit *tit) {
  return tit_node_ignore_any_overlay(tit);
}


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

x86 assembly (clang, -O2):
<tit_for_error>:
jmp    1030 <tit_node_ignore_any_overlay@plt>

LLVM IR (-O0):
%struct.node = type { i32 }
%struct.tit = type { i32 }
define %struct.node* @tit_for_error(%struct.tit* %0) {
%2 = alloca %struct.tit*
store %struct.tit* %0, %struct.tit** %2
%3 = load %struct.tit*, %struct.tit** %2
%4 = call %struct.node* @tit_node_ignore_any_overlay(%struct.tit* %3)
ret %struct.node* %4
}

LLVM IR (-O2):
%struct.node = type { i32 }
%struct.tit = type { i32 }
define %struct.node* @tit_for_error(%struct.tit* %0) {
%2 = tail call %struct.node* @tit_node_ignore_any_overlay(%struct.tit* %0)
ret %struct.node* %2
}
StrCmpAL(ptr1, ptr2) unsigned char *ptr1, *ptr2;
{
  for (; *ptr1 && (*ptr1 | 0x20) == *ptr2; ptr1++, ptr2++)
    ;
  return *ptr1 - *ptr2;
}


x86 assembly (clang, -O0):
<StrCmpAL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     113a <StrCmpAL+0x3a>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
or     $0x20,%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114a <StrCmpAL+0x4a>
jmp    116c <StrCmpAL+0x6c>
jmp    114f <StrCmpAL+0x4f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <StrCmpAL+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrCmpAL>:
mov    (%rdi),%al
test   %al,%al
je     1128 <StrCmpAL+0x28>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
mov    %eax,%ecx
or     $0x20,%cl
cmp    (%rsi),%cl
jne    112a <StrCmpAL+0x2a>
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <StrCmpAL+0x10>
xor    %eax,%eax
movzbl %al,%eax
movzbl (%rsi),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @StrCmpAL(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %12
%6 = phi i8 [ %15, %12 ], [ %3, %2 ]
%7 = phi i8* [ %14, %12 ], [ %1, %2 ]
%8 = phi i8* [ %13, %12 ], [ %0, %2 ]
%9 = or i8 %6, 32
%10 = load i8, i8* %7
%11 = icmp eq i8 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %5
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = load i8, i8* %13
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %12, %2
%18 = phi i8* [ %1, %2 ], [ %14, %12 ], [ %7, %5 ]
%19 = phi i8 [ 0, %2 ], [ 0, %12 ], [ %6, %5 ]
%20 = zext i8 %19 to i32
%21 = load i8, i8* %18
%22 = zext i8 %21 to i32
%23 = sub nsw i32 %20, %22
ret i32 %23
}
/* Type definitions */
typedef char u_char;

/* Variables and functions */
int is_marked_packet(u_char *buf, int bufsiz) {
  return ((bufsiz > 13) ? (buf[13] == 'Z') : 0);
}


x86 assembly (clang, -O0):
<is_marked_packet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
jle    1130 <is_marked_packet+0x30>
mov    -0x8(%rbp),%rax
movsbl 0xd(%rax),%eax
cmp    $0x5a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
jmp    113a <is_marked_packet+0x3a>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    113a <is_marked_packet+0x3a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_marked_packet>:
xor    %eax,%eax
cmp    $0xe,%esi
jl     1110 <is_marked_packet+0x10>
xor    %eax,%eax
cmpb   $0x5a,0xd(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_marked_packet(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 13
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %0, i64 13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 90
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void _map_assert(int x) {
  if (x) {
    fprintf(stderr, "Assertion failure in cmap!\n");
    assert(0);
  }
}


x86 assembly (clang, -O0):
<_map_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1151 <_map_assert+0x31>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_map_assert>:
test   %edi,%edi
je     1142 <_map_assert+0x22>
push   %rax
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <assert@plt>
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"Assertion failure in cmap!\0A\00"
define void @_map_assert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @assert(i32 0)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"Assertion failure in cmap!\0A\00"
define void @_map_assert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @assert(i32 0)
br label %7
7: ; preds = %3, %1
ret void
}
long IS_ERR_OR_NULL(const void *ptr) {
  return !ptr || (((unsigned long)ptr) >= (unsigned long)-4095);
}


x86 assembly (clang, -O0):
<IS_ERR_OR_NULL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <IS_ERR_OR_NULL+0x28>
mov    -0x8(%rbp),%rax
cmp    $0xfffffffffffff001,%rax
setae  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_ERR_OR_NULL>:
test   %rdi,%rdi
sete   %al
cmp    $0xfffffffffffff001,%rdi
setae  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i64 @IS_ERR_OR_NULL(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i64
%8 = icmp uge i64 %7, -4095
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ true, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
%12 = sext i32 %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @IS_ERR_OR_NULL(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = icmp ugt i8* %0, inttoptr (i64 -4096 to i8*)
%4 = or i1 %2, %3
%5 = zext i1 %4 to i64
ret i64 %5
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t max16(int16_t a, int16_t b) { return ((a) < (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<max16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <max16+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max16+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max16>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max16(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void RTPathSetTimesEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathSetTimesEx() {
ret void
}
int roundUp(int n, int m) {
  if (n % m == 0)
    return n;
  else if (n >= 0)
    return n + m - n % m;
  else
    return n - n % m;
}


x86 assembly (clang, -O0):
<roundUp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1125 <roundUp+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <roundUp+0x61>
cmpl   $0x0,-0x8(%rbp)
jl     114c <roundUp+0x4c>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <roundUp+0x61>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    -0x14(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundUp>:
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1116 <roundUp+0x16>
test   %edi,%edi
js     1114 <roundUp+0x14>
add    %edi,%esi
sub    %edx,%esi
mov    %esi,%eax
ret
sub    %edx,%edi
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @roundUp(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = icmp sgt i32 %0, -1
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = add nsw i32 %1, %0
%9 = sub i32 %8, %3
br label %12
10: ; preds = %5
%11 = sub nsw i32 %0, %3
br label %12
12: ; preds = %2, %10, %7
%13 = phi i32 [ %9, %7 ], [ %11, %10 ], [ %0, %2 ]
ret i32 %13
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int sizefile(const char *file) {
  struct stat sb;
  if (stat(file, &sb) < 0)
    return (-1);
  return ((((sb.st_size) + 1023) >> 10));
}


x86 assembly (clang, -O0):
<sizefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <sizefile+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <sizefile+0x3d>
mov    -0x18(%rbp),%eax
add    $0x3ff,%eax
sar    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizefile>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    $0x3ff,%ecx
add    (%rsp),%ecx
sar    $0xa,%ecx
test   %rax,%rax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @sizefile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %14
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1023
%13 = ashr i32 %12, 10
store i32 %13, i32* %2
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @sizefile(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1023
%9 = ashr i32 %8, 10
%10 = select i1 %5, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int bits(int, int, int);
unsigned join_bits_u(int val1, int offset1, int len1, int val2, int offset2,
                     int len2) {
  return (bits(val1, offset1, len1) << len2) | bits(val2, offset2, len2);
}


x86 assembly (clang, -O0):
<join_bits_u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <bits@plt>
mov    -0x18(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <bits@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_bits_u>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %r8d,%r14d
mov    %ecx,%r15d
call   1030 <bits@plt>
mov    %eax,%ebp
mov    %ebx,%ecx
shl    %cl,%ebp
mov    %r15d,%edi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <bits@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @join_bits_u(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* %8
%15 = load i32, i32* %9
%16 = call i32 @bits(i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %12
%18 = shl i32 %16, %17
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = call i32 @bits(i32 %19, i32 %20, i32 %21)
%23 = or i32 %18, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @join_bits_u(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @bits(i32 %0, i32 %1, i32 %2)
%8 = shl i32 %7, %5
%9 = tail call i32 @bits(i32 %3, i32 %4, i32 %5)
%10 = or i32 %8, %9
ret i32 %10
}
int isxdigit(int c) {
  return !!(((c >= '0') && (c <= '9')) || ((c >= 'a') && (c <= 'f')) ||
            ((c >= 'A') && (c <= 'F')));
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x30,-0x4(%rbp)
jl     1120 <isxdigit+0x20>
mov    $0x1,%al
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
cmpl   $0x61,-0x4(%rbp)
jl     1139 <isxdigit+0x39>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <isxdigit+0x52>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 102
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 65
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 70
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = xor i1 %23, true
%25 = xor i1 %24, true
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

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

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


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

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

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

LLVM IR (-O2):
define i32 @get_XLeaveWindowEvent_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void subvf(float *result, const float s1) {
  result[0] -= s1;
  result[1] -= s1;
  result[2] -= s1;
}


x86 assembly (clang, -O0):
<subvf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,(%rax)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
movss  -0xc(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<subvf>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm2
subss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
subss  %xmm0,%xmm2
movss  %xmm2,0x4(%rdi)
movss  0x8(%rdi),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,0x8(%rdi)
ret

LLVM IR (-O0):
define void @subvf(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 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = fsub float %8, %5
store float %9, float* %7
%10 = load float, float* %4
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = fsub float %13, %10
store float %14, float* %12
%15 = load float, float* %4
%16 = load float*, float** %3
%17 = getelementptr inbounds float, float* %16, i64 2
%18 = load float, float* %17
%19 = fsub float %18, %15
store float %19, float* %17
ret void
}

LLVM IR (-O2):
define void @subvf(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fsub float %3, %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fsub float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fsub float %9, %1
store float %10, float* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xa4() {
  Assert_real((isspace(164) == 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_isspace.c",
              825, ("isspace should be 0 for 0xa4"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xa4>:
push   %rax
mov    $0xa4,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x339,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xa4\00"
define void @t_isspace_0xa4() {
%1 = call i64 @isspace(i32 164)
%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 825, i8* getelementptr inbounds ([29 x i8], [29 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xa4\00"
define void @t_isspace_0xa4() {
%1 = tail call i64 @isspace(i32 164)
%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 825, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpuid(unsigned int, unsigned int *, unsigned int *,
                         unsigned int *, unsigned int *);
unsigned int cpuid_edx(unsigned int op) {
  unsigned int eax, ebx, ecx, edx;
  cpuid(op, &eax, &ebx, &ecx, &edx);
  return edx;
}


x86 assembly (clang, -O0):
<cpuid_edx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_edx>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_edx(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = call i32 @cpuid(i32 %0, i32* %2, i32* %3, i32* %4, i32* %5)
%11 = load i32, i32* %5
ret i32 %11
}
void element2SPACE() {}


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

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

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

LLVM IR (-O2):
define void @element2SPACE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __attribute__((destructor)) destructor() {
  printf("------------------------------------------------------- TEST END\n");
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"------------------------------------------------------- TEST END\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @destructor, i8* null }]
define void @destructor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @destructor, i8* null }]
@str = [65 x i8] c"------------------------------------------------------- TEST END\00"
define void @destructor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned bitarithm_lsb(register unsigned v) {
  register unsigned r = 0;
  while ((v & 0x01) == 0) {
    v >>= 1;
    r++;
  };
  return r;
}


x86 assembly (clang, -O0):
<bitarithm_lsb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1134 <bitarithm_lsb+0x34>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <bitarithm_lsb+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitarithm_lsb>:
xor    %eax,%eax
test   $0x1,%dil
jne    111d <bitarithm_lsb+0x1d>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax)
shr    %ecx
add    $0x1,%eax
test   $0x2,%dil
mov    %ecx,%edi
je     1110 <bitarithm_lsb+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitarithm_lsb(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = lshr i32 %6, 1
%8 = add i32 %5, 1
%9 = and i32 %6, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
void ff_hevc_put_hevc_uni_pel_pixels96_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels96_8_avx2() {
ret void
}
int function(int i, int j) { return i + j * 42; }


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x2a,-0x8(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function>:
imul   $0x2a,%esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @function(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 = mul nsw i32 %6, 42
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @function(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, 42
%4 = add nsw i32 %3, %0
ret i32 %4
}
/* Type definitions */
struct em8051 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int disasm_da_a(struct em8051 *aCPU, int aPosition, char *aBuffer) {
  sprintf(aBuffer, "DA    A");
  return 1;
}


x86 assembly (clang, -O0):
<disasm_da_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <sprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disasm_da_a>:
movabs $0x41202020204144,%rax
mov    %rax,(%rdx)
mov    $0x1,%eax
ret

LLVM IR (-O0):
%struct.em8051 = type { i32 }
@.str = [8 x i8] c"DA A\00"
define i32 @disasm_da_a(%struct.em8051* %0, i32 %1, i8* %2) {
%4 = alloca %struct.em8051*
%5 = alloca i32
%6 = alloca i8*
store %struct.em8051* %0, %struct.em8051** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.em8051 = type { i32 }
define i32 @disasm_da_a(%struct.em8051* nocapture readnone %0, i32 %1, i8* nocapture writeonly %2) {
%4 = bitcast i8* %2 to i64*
store i64 18331195836219716, i64* %4
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x55() {
  Assert_real((isspace(85) == 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_isspace.c",
              430, ("isspace should be 0 for U"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x55>:
push   %rax
mov    $0x55,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1ae,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for U\00"
define void @t_isspace_0x55() {
%1 = call i64 @isspace(i32 85)
%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 430, 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for U\00"
define void @t_isspace_0x55() {
%1 = tail call i64 @isspace(i32 85)
%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 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void free_percpu(void *ptr) { assert(0); }


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

x86 assembly (clang, -O2):
<free_percpu>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @free_percpu(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @free_percpu(i8* nocapture readnone %0) {
%2 = tail call i32 @assert(i32 0)
ret void
}
unsigned short MmioUtil_Read16(void *base, const unsigned long offset) {
  return *(volatile unsigned short *)(void *)((char *)(base) + (offset));
}


x86 assembly (clang, -O0):
<MmioUtil_Read16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%ax
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @MmioUtil_Read16(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = bitcast i8* %7 to i16*
%9 = load volatile i16, i16* %8
ret i16 %9
}

LLVM IR (-O2):
define zeroext i16 @MmioUtil_Read16(i8* %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = bitcast i8* %3 to i16*
%5 = load volatile i16, i16* %4
ret i16 %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t swap16(uint16_t v16) { return (v16 >> 8) | (v16 << 8); }


x86 assembly (clang, -O0):
<swap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap16>:
mov    %edi,%eax
sar    $0x8,%eax
shl    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @swap16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @swap16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
scalar_t__ const_time_eq(unsigned int, unsigned int);
unsigned char const_time_eq_u8(unsigned int a, unsigned int b) {
  return (unsigned char)const_time_eq(a, b);
}


x86 assembly (clang, -O0):
<const_time_eq_u8>:
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 <const_time_eq@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<const_time_eq_u8>:
push   %rax
call   1030 <const_time_eq@plt>
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @const_time_eq_u8(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 i64 @const_time_eq(i32 %5, i32 %6)
%8 = trunc i64 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define zeroext i8 @const_time_eq_u8(i32 %0, i32 %1) {
%3 = tail call i64 @const_time_eq(i32 %0, i32 %1)
%4 = trunc i64 %3 to i8
ret i8 %4
}