xunge/DecIR huggingface dataset:
/* Type definitions */
struct yuuu_ipv4_hdr {
  int dummy;
};
struct yuuu_ipfrags {
  int dummy;
};

/* Variables and functions */
struct yuuu_ipv4_hdr *yuuu_ipfrag_find(struct yuuu_ipfrags *,
                                       struct yuuu_ipv4_hdr *);
int yuuu_ipfrag_reassembley(struct yuuu_ipfrags *ipfrags,
                            struct yuuu_ipv4_hdr *iphdr) {
  struct yuuu_ipv4_hdr *new = yuuu_ipfrag_find(ipfrags, iphdr);
  if (!new)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<yuuu_ipfrag_reassembley>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <yuuu_ipfrag_find@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1148 <yuuu_ipfrag_reassembley+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <yuuu_ipfrag_reassembley+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yuuu_ipfrag_reassembley>:
push   %rax
call   1030 <yuuu_ipfrag_find@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.yuuu_ipfrags = type { i32 }
%struct.yuuu_ipv4_hdr = type { i32 }
define i32 @yuuu_ipfrag_reassembley(%struct.yuuu_ipfrags* %0, %struct.yuuu_ipv4_hdr* %1) {
%3 = alloca i32
%4 = alloca %struct.yuuu_ipfrags*
%5 = alloca %struct.yuuu_ipv4_hdr*
%6 = alloca %struct.yuuu_ipv4_hdr*
store %struct.yuuu_ipfrags* %0, %struct.yuuu_ipfrags** %4
store %struct.yuuu_ipv4_hdr* %1, %struct.yuuu_ipv4_hdr** %5
%7 = load %struct.yuuu_ipfrags*, %struct.yuuu_ipfrags** %4
%8 = load %struct.yuuu_ipv4_hdr*, %struct.yuuu_ipv4_hdr** %5
%9 = call %struct.yuuu_ipv4_hdr* @yuuu_ipfrag_find(%struct.yuuu_ipfrags* %7, %struct.yuuu_ipv4_hdr* %8)
store %struct.yuuu_ipv4_hdr* %9, %struct.yuuu_ipv4_hdr** %6
%10 = load %struct.yuuu_ipv4_hdr*, %struct.yuuu_ipv4_hdr** %6
%11 = icmp ne %struct.yuuu_ipv4_hdr* %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 -1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
%struct.yuuu_ipfrags = type { i32 }
%struct.yuuu_ipv4_hdr = type { i32 }
define i32 @yuuu_ipfrag_reassembley(%struct.yuuu_ipfrags* %0, %struct.yuuu_ipv4_hdr* %1) {
%3 = tail call %struct.yuuu_ipv4_hdr* @yuuu_ipfrag_find(%struct.yuuu_ipfrags* %0, %struct.yuuu_ipv4_hdr* %1)
%4 = icmp eq %struct.yuuu_ipv4_hdr* %3, null
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int EINVAL;
int /*<<< orphan*/ help();
int run_cmd(int, char **);
int main(int argc, char *argv[]) {
  int i, found = 0, retval = 0;
  if (argc < 2) {
    help();
    return -EINVAL;
  }
  return run_cmd(argc - 1, &argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1168 <main+0x48>
mov    $0x0,%al
call   1030 <help@plt>
xor    %eax,%eax
mov    0x2e82(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    117e <main+0x5e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1040 <run_cmd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x1,%edi
jg     113c <main+0x1c>
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <help@plt>
mov    0x2eaa(%rip),%rax
sub    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret
add    $0xffffffff,%edi
add    $0x8,%rsi
jmp    1040 <run_cmd@plt>

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %8
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 (...) @help()
%13 = load i32, i32* @EINVAL
%14 = sub nsw i32 0, %13
store i32 %14, i32* %3
br label %21
15: ; preds = %2
%16 = load i32, i32* %4
%17 = sub nsw i32 %16, 1
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = call i32 @run_cmd(i32 %17, i8** %19)
store i32 %20, i32* %3
br label %21
21: ; preds = %15, %11
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = tail call i32 (...) @help()
%6 = load i32, i32* @EINVAL
%7 = sub nsw i32 0, %6
br label %12
8: ; preds = %2
%9 = add nsw i32 %0, -1
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = tail call i32 @run_cmd(i32 %9, i8** %10)
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ %7, %4 ], [ %11, %8 ]
ret i32 %13
}
int hash_direct_equal(const void *ptr_one, const void *ptr_two) {
  return ptr_one == ptr_two;
}


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

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

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

LLVM IR (-O2):
define i32 @hash_direct_equal(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long http_parser_version(void) {
  return 2 * 0x10000 | 4 * 0x00100 | 2 * 0x00001;
}


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

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

LLVM IR (-O0):
define i64 @http_parser_version() {
ret i64 132098
}

LLVM IR (-O2):
define i64 @http_parser_version() {
ret i64 132098
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char);
int /*<<< orphan*/ my_putstr(char *);
void my_put2str(char **str) {
  int i;
  i = 0;
  while (str[i]) {
    my_putstr(str[i]);
    my_putchar('\n');
    ++i;
  }
}


x86 assembly (clang, -O0):
<my_put2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     116f <my_put2str+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <my_putstr@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <my_put2str+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_put2str>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     114b <my_put2str+0x2b>
add    $0x8,%rbx
call   1040 <my_putstr@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <my_put2str+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @my_put2str(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8* [ %11, %4 ], [ %2, %1 ]
%7 = tail call i32 @my_putstr(i8* %6)
%8 = tail call i32 @my_putchar(i8 signext 10)
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
/* Variables and functions */
int getpgrp();
int getpid();
int /*<<< orphan*/ printf(char *, int, int);
void sig_int_handler(int signo) {
  printf("Process ID[%d],Group ID[%d] get SIGINT.\n", getpid(), getpgrp());
  return;
}


x86 assembly (clang, -O0):
<sig_int_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getpgrp@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_int_handler>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getpgrp@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Process ID[%d],Group ID[%d] get SIGINT.\0A\00"
define void @sig_int_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = call i32 (...) @getpgrp()
%5 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"Process ID[%d],Group ID[%d] get SIGINT.\0A\00"
define void @sig_int_handler(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (...) @getpgrp()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int streq(const char *a, const char *b) {
  if (a && b)
    return strcmp(a, b) ? 0 : 1;
  if (!a && !b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115c <streq+0x4c>
cmpq   $0x0,-0x18(%rbp)
je     115c <streq+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <streq+0x75>
cmpq   $0x0,-0x10(%rbp)
jne    117e <streq+0x6e>
cmpq   $0x0,-0x18(%rbp)
jne    117e <streq+0x6e>
movl   $0x1,-0x4(%rbp)
jmp    1185 <streq+0x75>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
test   %rdi,%rdi
je     112e <streq+0x1e>
test   %rsi,%rsi
je     112e <streq+0x1e>
push   %rax
call   1030 <strcmp@plt>
test   %rax,%rax
sete   %al
add    $0x8,%rsp
movzbl %al,%eax
ret
or     %rsi,%rdi
sete   %al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i64 @strcmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
br label %12
9: ; preds = %2
%10 = or i1 %3, %4
%11 = xor i1 %10, true
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ %8, %6 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
ret i32 %14
}
void Copy_Src_To_Dst_And_Add_1_To_Dst(void) {
  printf("\n--- %s() ---\n", __func__);
  int src = 12;
  int dst = 999;
  asm("mov %1, %0\n\t"
      "add $1, %0"
      : "=r"(dst)
      : "r"(src));
  printf("%d\n", dst);
}


x86 assembly (clang, -O0):
<Copy_Src_To_Dst_And_Add_1_To_Dst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xc,-0x4(%rbp)
movl   $0x3e7,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Copy_Src_To_Dst_And_Add_1_To_Dst>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef0(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xc,%eax
mov    %eax,%esi
add    $0x1,%esi
lea    0xef9(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\0A--- %s() ---\0A\00"
@__func__.Copy_Src_To_Dst_And_Add_1_To_Dst = [33 x i8] c"Copy_Src_To_Dst_And_Add_1_To_Dst\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @Copy_Src_To_Dst_And_Add_1_To_Dst() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__func__.Copy_Src_To_Dst_And_Add_1_To_Dst, i64 0, i64 0))
store i32 12, i32* %1
store i32 999, i32* %2
%4 = load i32, i32* %1
%5 = call i32 asm "mov $1, $0\0A\09add $$1, $0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\0A--- %s() ---\0A\00"
@__func__.Copy_Src_To_Dst_And_Add_1_To_Dst = [33 x i8] c"Copy_Src_To_Dst_And_Add_1_To_Dst\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @Copy_Src_To_Dst_And_Add_1_To_Dst() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__func__.Copy_Src_To_Dst_And_Add_1_To_Dst, i64 0, i64 0))
%2 = tail call i32 asm "mov $1, $0\0A\09add $$1, $0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i32 12)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret void
}
unsigned char check_uchar() { return 0; }


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

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

LLVM IR (-O0):
define zeroext i8 @check_uchar() {
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @check_uchar() {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ gui_delete_message();
int /*<<< orphan*/ gui_draw_message(char *);
int /*<<< orphan*/ gui_wait_for_any_key();
void gui_message(char *msg) {
  gui_draw_message(msg);
  gui_wait_for_any_key();
  gui_delete_message();
}


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

x86 assembly (clang, -O2):
<gui_message>:
push   %rax
call   1030 <gui_draw_message@plt>
xor    %eax,%eax
call   1050 <gui_wait_for_any_key@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <gui_delete_message@plt>

LLVM IR (-O0):
define void @gui_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @gui_draw_message(i8* %3)
%5 = call i32 (...) @gui_wait_for_any_key()
%6 = call i32 (...) @gui_delete_message()
ret void
}

LLVM IR (-O2):
define void @gui_message(i8* %0) {
%2 = tail call i32 @gui_draw_message(i8* %0)
%3 = tail call i32 (...) @gui_wait_for_any_key()
%4 = tail call i32 (...) @gui_delete_message()
ret void
}
/* Variables and functions */
long afs_file_length(char const *);
scalar_t__ afs_initialized();
long stdio_filesize(char const *);
long filesize(const char *fname) {
  if (afs_initialized())
    return afs_file_length(fname);
  else
    return stdio_filesize(fname);
}


x86 assembly (clang, -O0):
<filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <afs_initialized@plt>
cmp    $0x0,%rax
je     115f <filesize+0x2f>
mov    -0x10(%rbp),%rdi
call   1050 <afs_file_length@plt>
mov    %rax,-0x8(%rbp)
jmp    116c <filesize+0x3c>
mov    -0x10(%rbp),%rdi
call   1040 <stdio_filesize@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesize>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <afs_initialized@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1149 <filesize+0x19>
pop    %rbx
jmp    1050 <afs_file_length@plt>
pop    %rbx
jmp    1040 <stdio_filesize@plt>

LLVM IR (-O0):
define i64 @filesize(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 (...) @afs_initialized()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i64 @afs_file_length(i8* %7)
store i64 %8, i64* %2
br label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i64 @stdio_filesize(i8* %10)
store i64 %11, i64* %2
br label %12
12: ; preds = %9, %6
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @filesize(i8* %0) {
%2 = tail call i64 (...) @afs_initialized()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i64 @afs_file_length(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i64 @stdio_filesize(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i64 [ %5, %4 ], [ %7, %6 ]
ret i64 %9
}
void OSP_linear_acc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @OSP_linear_acc_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeudp(int sockfd) { close(sockfd); }


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

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

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

LLVM IR (-O2):
define void @closeudp(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ usleep(int);
int main(void) {
  while (1) {
    printf("Hallo, ich bins....  Pidi %d\n", getpid());
    usleep(500000);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x7a120,%edi
call   1050 <usleep@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x7a120,%edi
call   1050 <usleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
@.str = [30 x i8] c"Hallo, ich bins.... Pidi %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @getpid()
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @usleep(i32 500000)
br label %2
}

LLVM IR (-O2):
@.str = [30 x i8] c"Hallo, ich bins.... Pidi %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @usleep(i32 500000)
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void write8(volatile void *addr, uint8_t b) { *(volatile uint8_t *)addr = b; }


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

x86 assembly (clang, -O2):
<write8>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @write8(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @write8(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store volatile i32 %1, i32* %3
ret void
}
/* Variables and functions */
char *getenv(char *);
const char *path_prefix(void) {
  char *ret = getenv("TEST_SOCKET_PATH");
  if (ret)
    return ret;
  return "/tmp";
}


x86 assembly (clang, -O0):
<path_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <path_prefix+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114b <path_prefix+0x3b>
lea    0xeca(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_prefix>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xeea(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"TEST_SOCKET_PATH\00"
@.str.1 = [5 x i8] c"/tmp\00"
define i8* @path_prefix() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i8*, i8** %2
store i8* %7, i8** %1
br label %9
8: ; preds = %0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %9
9: ; preds = %8, %6
%10 = load i8*, i8** %1
ret i8* %10
}

LLVM IR (-O2):
@.str = [17 x i8] c"TEST_SOCKET_PATH\00"
@.str.1 = [5 x i8] c"/tmp\00"
define i8* @path_prefix() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_silence() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_silence"
         "\n");
}


x86 assembly (clang, -O0):
<pa_memblockq_silence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"NOT IMPLEMENTED:pa_memblockq_silence\0A\00"
define i32 @pa_memblockq_silence() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_memblockq_silence\00"
define i32 @pa_memblockq_silence() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
bool SHAREMIND_SET_KEY_EQUALS_unsigned(unsigned const k1, unsigned const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_EQUALS_unsigned>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_EQUALS_unsigned>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_EQUALS_unsigned(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int _hash(const char *str) {
  unsigned int ret = 5419;
  if (str) {
    while (*str)
      ret = ((ret << 5) + (ret << 2) + ret) + *str++;
  }
  return ret % 256;
}


x86 assembly (clang, -O0):
<_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x152b,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <_hash+0x5e>
jmp    111f <_hash+0x1f>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1159 <_hash+0x59>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <_hash+0x1f>
jmp    115e <_hash+0x5e>
mov    -0xc(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hash>:
mov    $0x2b,%eax
test   %rdi,%rdi
je     1139 <_hash+0x39>
mov    (%rdi),%cl
test   %cl,%cl
je     1139 <_hash+0x39>
add    $0x1,%rdi
mov    $0x152b,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,8),%edx
lea    (%rax,%rdx,4),%edx
movzbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <_hash+0x20>
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 5419, i32* %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %25
6: ; preds = %1
br label %7
7: ; preds = %11, %6
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = load i32, i32* %3
%13 = shl i32 %12, 5
%14 = load i32, i32* %3
%15 = shl i32 %14, 2
%16 = add i32 %13, %15
%17 = load i32, i32* %3
%18 = add i32 %16, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %2
%21 = load i8, i8* %19
%22 = sext i8 %21 to i32
%23 = add i32 %18, %22
store i32 %23, i32* %3
br label %7
24: ; preds = %7
br label %25
25: ; preds = %24, %1
%26 = load i32, i32* %3
%27 = urem i32 %26, 256
ret i32 %27
}

LLVM IR (-O2):
define i32 @_hash(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %18, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %14, %6 ], [ %4, %3 ]
%8 = phi i32 [ %13, %6 ], [ 5419, %3 ]
%9 = phi i8* [ %11, %6 ], [ %0, %3 ]
%10 = mul i32 %8, 37
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = zext i8 %7 to i32
%13 = add i32 %10, %12
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6
%17 = and i32 %13, 255
br label %18
18: ; preds = %16, %3, %1
%19 = phi i32 [ 43, %1 ], [ 43, %3 ], [ %17, %16 ]
ret i32 %19
}
int foo(int x, int y) { return x == 0 ? x : y; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    111f <foo+0x1f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <foo+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %esi,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ xDeleteComments(char *);
int /*<<< orphan*/ xTrimLeft(char *);
char *xTrimRight(int /*<<< orphan*/);
char *xTrimAndCleanComments(char *buffer) {
  xDeleteComments(buffer);
  buffer = xTrimRight(xTrimLeft(buffer));
  if (buffer[0] != '\0')
    return (buffer);
  return (NULL);
}


x86 assembly (clang, -O0):
<xTrimAndCleanComments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <xDeleteComments@plt>
mov    -0x10(%rbp),%rdi
call   1030 <xTrimLeft@plt>
mov    %eax,%edi
call   1040 <xTrimRight@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1176 <xTrimAndCleanComments+0x46>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117e <xTrimAndCleanComments+0x4e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xTrimAndCleanComments>:
push   %rbx
mov    %rdi,%rbx
call   1050 <xDeleteComments@plt>
mov    %rbx,%rdi
call   1030 <xTrimLeft@plt>
mov    %eax,%edi
call   1040 <xTrimRight@plt>
xor    %ecx,%ecx
cmpb   $0x0,(%rax)
cmove  %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @xTrimAndCleanComments(i8* %0) {
%2 = tail call i32 @xDeleteComments(i8* %0)
%3 = tail call i32 @xTrimLeft(i8* %0)
%4 = tail call i8* @xTrimRight(i32 %3)
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = select i1 %6, i8* null, i8* %4
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ isotp_send_to(int, char *, int, int);
void isotp_send(int can, char *data, int size) {
  isotp_send_to(can, data, size, 0x7e8);
}


x86 assembly (clang, -O0):
<isotp_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x7e8,%ecx
call   1030 <isotp_send_to@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isotp_send>:
mov    $0x7e8,%ecx
jmp    1030 <isotp_send_to@plt>

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

LLVM IR (-O2):
define void @isotp_send(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @isotp_send_to(i32 %0, i8* %1, i32 %2, i32 2024)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("passage-a.c\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"passage-a.c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"passage-a.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void OLInit() {}


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

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

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

LLVM IR (-O2):
define void @OLInit() {
ret void
}
int test_imm_F2int64_highword_reg(long long val) {
  return ((val >> 32) & (0xF2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F2int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0xf2,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F2int64_highword_reg>:
movabs $0xf200000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F2int64_highword_reg(i64 %0) {
%2 = and i64 %0, 1039382085632
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegReadWord(int /*<<< orphan*/, int);
uint16_t wiznetGetSocketDestPort(uint8_t socket) {
  return wiznetRegReadWord(socket, (0x0000 + 0x0010));
}


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

x86 assembly (clang, -O2):
<wiznetGetSocketDestPort>:
mov    $0x10,%esi
jmp    1030 <wiznetRegReadWord@plt>

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

LLVM IR (-O2):
define i32 @wiznetGetSocketDestPort(i32 %0) {
%2 = tail call i32 @wiznetRegReadWord(i32 %0, i32 16)
ret i32 %2
}
int isTriangulo(double a, double b, double c) {
  return a < b + c && b < a + c && c < a + b;
}


x86 assembly (clang, -O0):
<isTriangulo>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jbe    1168 <isTriangulo+0x68>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jbe    1168 <isTriangulo+0x68>
movsd  -0x18(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTriangulo>:
movapd %xmm1,%xmm3
addsd  %xmm2,%xmm3
ucomisd %xmm0,%xmm3
seta   %al
movapd %xmm0,%xmm3
addsd  %xmm2,%xmm3
ucomisd %xmm1,%xmm3
seta   %cl
and    %al,%cl
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
seta   %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @isTriangulo(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fadd double %8, %9
%11 = fcmp olt double %7, %10
br i1 %11, label %12, label %24
12: ; preds = %3
%13 = load double, double* %5
%14 = load double, double* %4
%15 = load double, double* %6
%16 = fadd double %14, %15
%17 = fcmp olt double %13, %16
br i1 %17, label %18, label %24
18: ; preds = %12
%19 = load double, double* %6
%20 = load double, double* %4
%21 = load double, double* %5
%22 = fadd double %20, %21
%23 = fcmp olt double %19, %22
br label %24
24: ; preds = %18, %12, %3
%25 = phi i1 [ false, %12 ], [ false, %3 ], [ %23, %18 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @isTriangulo(double %0, double %1, double %2) {
%4 = fadd double %1, %2
%5 = fcmp ogt double %4, %0
%6 = fadd double %0, %2
%7 = fcmp ogt double %6, %1
%8 = and i1 %5, %7
%9 = fadd double %0, %1
%10 = fcmp ogt double %9, %2
%11 = and i1 %10, %8
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ remove(char *);
int main() {
  remove("d:/urls1.dat");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"d:/urls1.dat\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"d:/urls1.dat\00"
define i32 @main() {
%1 = tail call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int set(char *buf, int value, int len) {
  int i;
  for (i = 0; i < len; i++)
    buf[i] = value;
  return i;
}


x86 assembly (clang, -O0):
<set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    113f <set+0x3f>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <set+0x15>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set>:
push   %rbx
test   %edx,%edx
jle    1120 <set+0x10>
mov    %edx,%ebx
mov    %edx,%edx
call   1030 <memset@plt>
jmp    1122 <set+0x12>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @set(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = trunc i32 %1 to i8
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %5, %3
%9 = phi i32 [ 0, %3 ], [ %2, %5 ]
ret i32 %9
}
int test_imm_D8uint16_mem(unsigned short *val) {
  return ((*val) & (0xD8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D8uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xd8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D8uint16_mem>:
testb  $0xd8,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D8uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 216
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ LCD_write_byte(int, int);
void LCD_clean(void) {
  unsigned int i;
  LCD_write_byte(0x40, 0);
  LCD_write_byte(0x80, 0);
  for (i = 0; i < 504; i++)
    LCD_write_byte(0, 1);
}


x86 assembly (clang, -O0):
<LCD_clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x40,%edi
xor    %esi,%esi
call   1030 <LCD_write_byte@plt>
mov    $0x80,%edi
xor    %esi,%esi
call   1030 <LCD_write_byte@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1f8,-0x4(%rbp)
jae    115e <LCD_clean+0x4e>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <LCD_write_byte@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1137 <LCD_clean+0x27>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_clean>:
push   %rbx
mov    $0x40,%edi
xor    %esi,%esi
call   1030 <LCD_write_byte@plt>
mov    $0x80,%edi
xor    %esi,%esi
call   1030 <LCD_write_byte@plt>
mov    $0x1f8,%ebx
xchg   %ax,%ax
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <LCD_write_byte@plt>
add    $0xffffffff,%ebx
jne    1130 <LCD_clean+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @LCD_clean() {
%1 = alloca i32
%2 = call i32 @LCD_write_byte(i32 64, i32 0)
%3 = call i32 @LCD_write_byte(i32 128, i32 0)
store i32 0, i32* %1
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %1
%6 = icmp ult i32 %5, 504
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 @LCD_write_byte(i32 0, i32 1)
br label %9
9: ; preds = %7
%10 = load i32, i32* %1
%11 = add i32 %10, 1
store i32 %11, i32* %1
br label %4
12: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @LCD_clean() {
%1 = tail call i32 @LCD_write_byte(i32 64, i32 0)
%2 = tail call i32 @LCD_write_byte(i32 128, i32 0)
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = tail call i32 @LCD_write_byte(i32 0, i32 1)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 504
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
int of_get_pci_domain_nr(struct device_node *node) { return -1; }


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

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

LLVM IR (-O0):
%struct.device_node = type opaque
define i32 @of_get_pci_domain_nr(%struct.device_node* %0) {
%2 = alloca %struct.device_node*
store %struct.device_node* %0, %struct.device_node** %2
ret i32 -1
}

LLVM IR (-O2):
%struct.device_node = type opaque
define i32 @of_get_pci_domain_nr(%struct.device_node* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int add_numbers(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int result;
  result = add_numbers(4, 3);
  printf("sum is %d.\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <add_numbers@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"sum is %d.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @add_numbers(i32 4, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DEC8(int /*<<< orphan*/);
int /*<<< orphan*/ Direct(int);
void OpC6M1(void) { DEC8(Direct(3)); }


x86 assembly (clang, -O0):
<OpC6M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
call   1040 <DEC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpC6M1>:
push   %rax
mov    $0x3,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <DEC8@plt>

LLVM IR (-O0):
define void @OpC6M1() {
%1 = call i32 @Direct(i32 3)
%2 = call i32 @DEC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpC6M1() {
%1 = tail call i32 @Direct(i32 3)
%2 = tail call i32 @DEC8(i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ is_bigendian();
float getnanf(void) {
  unsigned char nan[4];
  int i;
  for (i = 0; i < 4; i++)
    nan[i] = 1;
  if (is_bigendian()) {
    nan[0] = 0x7F;
    nan[1] = 0x80;
  } else {
    nan[3] = 0x7F;
    nan[2] = 0x80;
  }
  return (*((float *)nan));
}


x86 assembly (clang, -O0):
<getnanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1140 <getnanf+0x30>
movslq -0x8(%rbp),%rax
movb   $0x1,-0x4(%rbp,%rax,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <getnanf+0xf>
mov    $0x0,%al
call   1030 <is_bigendian@plt>
cmp    $0x0,%rax
je     115e <getnanf+0x4e>
movb   $0x7f,-0x4(%rbp)
movb   $0x80,-0x3(%rbp)
jmp    1166 <getnanf+0x56>
movb   $0x7f,-0x1(%rbp)
movb   $0x80,-0x2(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnanf>:
push   %rax
xor    %eax,%eax
call   1030 <is_bigendian@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
lea    0xed9(%rip),%rax
movss  (%rax,%rcx,4),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @getnanf() {
%1 = alloca [4 x i8]
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 4
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 %8
store i8 1, i8* %9
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
%14 = call i64 (...) @is_bigendian()
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
store i8 127, i8* %17
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
store i8 -128, i8* %18
br label %22
19: ; preds = %13
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
store i8 127, i8* %20
%21 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
store i8 -128, i8* %21
br label %22
22: ; preds = %19, %16
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%24 = bitcast i8* %23 to float*
%25 = load float, float* %24
ret float %25
}

LLVM IR (-O2):
define float @getnanf() {
%1 = tail call i64 (...) @is_bigendian()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, float 0x7FF0002020000000, float 0x3820300FE0000000
ret float %3
}