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

/* Variables and functions */
int cmp_date(struct tm const *, struct tm const *);
int date_in_safe_range(const struct tm *date, const struct tm *min,
                       const struct tm *max) {
  if (cmp_date(date, min) == -1)
    return 0;
  if (cmp_date(date, max) == 1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<date_in_safe_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <cmp_date@plt>
cmp    $0xffffffff,%eax
jne    1146 <date_in_safe_range+0x36>
movl   $0x0,-0x4(%rbp)
jmp    116f <date_in_safe_range+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <cmp_date@plt>
cmp    $0x1,%eax
jne    1168 <date_in_safe_range+0x58>
movl   $0x0,-0x4(%rbp)
jmp    116f <date_in_safe_range+0x5f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_in_safe_range>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <cmp_date@plt>
cmp    $0xffffffff,%eax
je     113b <date_in_safe_range+0x2b>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <cmp_date@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
setne  %al
jmp    113d <date_in_safe_range+0x2d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @date_in_safe_range(%struct.tm* %0, %struct.tm* %1, %struct.tm* %2) {
%4 = tail call i32 @cmp_date(%struct.tm* %0, %struct.tm* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32 @cmp_date(%struct.tm* %0, %struct.tm* %2)
%8 = icmp ne i32 %7, 1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3
%11 = phi i32 [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
size_t strlen(char *);
void append_char(char *strn, size_t maxsz, char c) {
  size_t len = strlen(strn);
  if (maxsz > len) {
    strn[len++] = c;
    strn[len] = '\0';
  }
}


x86 assembly (clang, -O0):
<append_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1165 <append_char+0x55>
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x20(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_char>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    %rbp,%rax
jae    1130 <append_char+0x20>
mov    %r14b,(%rbx,%rax,1)
movb   $0x0,0x1(%rbx,%rax,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @append_char(i8* nocapture %0, i64 %1, i8 signext %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = icmp ult i64 %4, %1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = add nuw i64 %4, 1
%8 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %2, i8* %8
%9 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %9
br label %10
10: ; preds = %6, %3
ret void
}
void foo(void) {
  unsigned int a;
  unsigned int *p = &a;
#pragma acc kernels pcopyin(a, p [0:1])
  {
    a = 0;
    *p = 1;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inb_cmos(int);
int /*<<< orphan*/ outb_cmos(int, int);
void init_rtc(void) {
  outb_cmos(0x0a, 0x26);
  outb_cmos(0x0b, 0x02);
  inb_cmos(0x0c);
  inb_cmos(0x0d);
}


x86 assembly (clang, -O0):
<init_rtc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
mov    $0x26,%esi
call   1040 <outb_cmos@plt>
mov    $0xb,%edi
mov    $0x2,%esi
call   1040 <outb_cmos@plt>
mov    $0xc,%edi
call   1030 <inb_cmos@plt>
mov    $0xd,%edi
call   1030 <inb_cmos@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_rtc>:
push   %rax
mov    $0xa,%edi
mov    $0x26,%esi
call   1040 <outb_cmos@plt>
mov    $0xb,%edi
mov    $0x2,%esi
call   1040 <outb_cmos@plt>
mov    $0xc,%edi
call   1030 <inb_cmos@plt>
mov    $0xd,%edi
pop    %rax
jmp    1030 <inb_cmos@plt>

LLVM IR (-O0):
define void @init_rtc() {
%1 = call i32 @outb_cmos(i32 10, i32 38)
%2 = call i32 @outb_cmos(i32 11, i32 2)
%3 = call i32 @inb_cmos(i32 12)
%4 = call i32 @inb_cmos(i32 13)
ret void
}

LLVM IR (-O2):
define void @init_rtc() {
%1 = tail call i32 @outb_cmos(i32 10, i32 38)
%2 = tail call i32 @outb_cmos(i32 11, i32 2)
%3 = tail call i32 @inb_cmos(i32 12)
%4 = tail call i32 @inb_cmos(i32 13)
ret void
}
/* Variables and functions */
int ioctl(int, unsigned int, void *);
int osslib_ioctl(int fd, unsigned int request, void *arg) {
  return ioctl(fd, request, arg);
}


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

x86 assembly (clang, -O2):
<osslib_ioctl>:
jmp    1030 <ioctl@plt>

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

LLVM IR (-O2):
define i32 @osslib_ioctl(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @ioctl(i32 %0, i32 %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hello Word"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Hello Word\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Hello Word\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
B() {}


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

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

LLVM IR (-O0):
define i32 @B() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @B() {
ret i32 undef
}
int endsWith(const char *haystack, const char *needle) {
  if (strlen(haystack) < strlen(needle))
    return 0;
  haystack = haystack + strlen(haystack) - strlen(needle);
  return (strcmp(haystack, needle) == 0);
}


x86 assembly (clang, -O0):
<endsWith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jae    1162 <endsWith+0x42>
movl   $0x0,-0x4(%rbp)
jmp    11b8 <endsWith+0x98>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endsWith>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%r15
jb     115f <endsWith+0x3f>
add    %r15,%rbx
sub    %rcx,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @endsWith(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 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %5
%9 = call i64 @strlen(i8* %8)
%10 = icmp ult i64 %7, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %26
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = load i8*, i8** %4
%15 = call i64 @strlen(i8* %14)
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8*, i8** %5
%18 = call i64 @strlen(i8* %17)
%19 = sub i64 0, %18
%20 = getelementptr inbounds i8, i8* %16, i64 %19
store i8* %20, i8** %4
%21 = load i8*, i8** %4
%22 = load i8*, i8** %5
%23 = call i32 @strcmp(i8* %21, i8* %22)
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
store i32 %25, i32* %3
br label %26
26: ; preds = %12, %11
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @endsWith(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp ult i64 %3, %4
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 %3
%8 = sub i64 0, %4
%9 = getelementptr inbounds i8, i8* %7, i64 %8
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(1) %1)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %2, %6
%14 = phi i32 [ %12, %6 ], [ 0, %2 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int main() {
  int n = 10;
  int drnum = 1;
  long int rezultat = 1;
  for (drnum = 1; drnum <= n; drnum += 1) {
    rezultat = rezultat * drnum;
  }
  printf("!10= %li\n", rezultat);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1166 <main+0x56>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113c <main+0x2c>
mov    -0x18(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"!10= %li\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64 3628800)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int procfs_generic_open(int /*<<< orphan*/, char *);
int procfs_mem_open(pid_t pid) { return procfs_generic_open(pid, "mem"); }


x86 assembly (clang, -O0):
<procfs_mem_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <procfs_generic_open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<procfs_mem_open>:
lea    0xee9(%rip),%rsi
jmp    1030 <procfs_generic_open@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"mem\00"
define i32 @procfs_mem_open(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @procfs_generic_open(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"mem\00"
define i32 @procfs_mem_open(i32 %0) {
%2 = tail call i32 @procfs_generic_open(i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
int IsOperator(char c) {
  int i = 21,
      operators[21] = {'+',  '-', '*', '/', '^', '%', '>', '<', '=', '!', '|',
                       '\\', '.', ':', '(', ')', '[', ']', '{', '}', '&'};
  while (i--) {
    if (operators[i] == c) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<IsOperator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x15,-0xc(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xed0(%rip),%rsi
mov    $0x54,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1173 <IsOperator+0x63>
movslq -0xc(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    116e <IsOperator+0x5e>
movl   $0x1,-0x4(%rbp)
jmp    117a <IsOperator+0x6a>
jmp    113a <IsOperator+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsOperator>:
add    $0xdf,%dil
cmp    $0x5c,%dil
ja     1124 <IsOperator+0x24>
mov    $0x1,%eax
movzbl %dil,%ecx
lea    0xee6(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.IsOperator.operators = [21 x i32] [i32 43, i32 45, i32 42, i32 47, i32 94, i32 37, i32 62, i32 60, i32 61, i32 33, i32 124, i32 92, i32 46, i32 58, i32 40, i32 41, i32 91, i32 93, i32 123, i32 125, i32 38]
define i32 @IsOperator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
%5 = alloca [21 x i32]
store i8 %0, i8* %3
store i32 21, i32* %4
%6 = bitcast [21 x i32]* %5 to i8*
br label %7
7: ; preds = %20, %1
%8 = load i32, i32* %4
%9 = add nsw i32 %8, -1
store i32 %9, i32* %4
%10 = icmp ne i32 %8, 0
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [21 x i32], [21 x i32]* %5, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %15, %17
br i1 %18, label %19, label %20
19: ; preds = %11
store i32 1, i32* %2
br label %22
20: ; preds = %11
br label %7
21: ; preds = %7
store i32 0, i32* %2
br label %22
22: ; preds = %21, %19
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @IsOperator(i8 signext %0) {
switch i8 %0, label %2 [
i8 38, label %3
i8 125, label %3
i8 123, label %3
i8 93, label %3
i8 91, label %3
i8 41, label %3
i8 40, label %3
i8 58, label %3
i8 46, label %3
i8 92, label %3
i8 124, label %3
i8 33, label %3
i8 61, label %3
i8 60, label %3
i8 62, label %3
i8 37, label %3
i8 94, label %3
i8 47, label %3
i8 42, label %3
i8 45, label %3
i8 43, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 1, %1 ], [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
void out3p(x, y, z) {
  writeop(x);
  wrc(' ');
  wrn(y);
  wrc(' ');
  wrc('L');
  wrn(z);
  wrc(' ');
}


x86 assembly (clang, -O0):
<out3p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <writeop@plt>
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <wrc@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1050 <wrn@plt>
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <wrc@plt>
mov    $0x4c,%edi
mov    $0x0,%al
call   1030 <wrc@plt>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1050 <wrn@plt>
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <wrc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out3p>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
xor    %eax,%eax
call   1040 <writeop@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   1030 <wrc@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1050 <wrn@plt>
mov    $0x20,%edi
xor    %eax,%eax
call   1030 <wrc@plt>
mov    $0x4c,%edi
xor    %eax,%eax
call   1030 <wrc@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <wrn@plt>
mov    $0x20,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <wrc@plt>

LLVM IR (-O0):
define void @out3p(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 (i32, ...) bitcast (i32 (...)* @writeop to i32 (i32, ...)*)(i32 %7)
%9 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
%10 = load i32, i32* %5
%11 = call i32 (i32, ...) bitcast (i32 (...)* @wrn to i32 (i32, ...)*)(i32 %10)
%12 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 76)
%14 = load i32, i32* %6
%15 = call i32 (i32, ...) bitcast (i32 (...)* @wrn to i32 (i32, ...)*)(i32 %14)
%16 = call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
ret void
}

LLVM IR (-O2):
define void @out3p(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @writeop to i32 (i32, ...)*)(i32 %0)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrn to i32 (i32, ...)*)(i32 %1)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 76)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrn to i32 (i32, ...)*)(i32 %2)
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @wrc to i32 (i32, ...)*)(i32 32)
ret void
}
void snd_hda_input_jack_free(struct hda_codec *codec) {}


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

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

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

LLVM IR (-O2):
%struct.hda_codec = type opaque
define void @snd_hda_input_jack_free(%struct.hda_codec* nocapture %0) {
ret void
}
unsigned int __uid() {
  static unsigned int uid = 100000;
  return uid++;
}


x86 assembly (clang, -O0):
<__uid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0b(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__uid>:
mov    0x2f1a(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f11(%rip)
ret

LLVM IR (-O0):
@__uid.uid = internal global i32 100000
define i32 @__uid() {
%1 = load i32, i32* @__uid.uid
%2 = add i32 %1, 1
store i32 %2, i32* @__uid.uid
ret i32 %1
}

LLVM IR (-O2):
@__uid.uid = internal unnamed_addr global i32 100000
define i32 @__uid() {
%1 = load i32, i32* @__uid.uid
%2 = add i32 %1, 1
store i32 %2, i32* @__uid.uid
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ XKeyboardControl;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XKeyboardControl(void *_p) {
  if (_p == NULL)
    abort();
  free((XKeyboardControl *)_p);
}


x86 assembly (clang, -O0):
<free_XKeyboardControl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XKeyboardControl+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XKeyboardControl>:
test   %rdi,%rdi
je     112a <free_XKeyboardControl+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XKeyboardControl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XKeyboardControl(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
void ABGRToYRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToYRow_AVX2() {
ret void
}
void soru_5(int dizi[10]) {}


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

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

LLVM IR (-O0):
define void @soru_5(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}

LLVM IR (-O2):
define void @soru_5(i32* nocapture %0) {
ret void
}
int help_state_resume(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @help_state_resume() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int get_direction() {
  printf("get_direction\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"get_direction\00"
define i32 @get_direction() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ aliensReset();
int /*<<< orphan*/ bunkersReset();
int /*<<< orphan*/ drawscore();
int /*<<< orphan*/ playerReset();
int /*<<< orphan*/ render();
int /*<<< orphan*/ ufoReset();
void initLevel() {
  playerReset();
  aliensReset();
  ufoReset();
  bunkersReset();
  render();
  drawscore();
}


x86 assembly (clang, -O0):
<initLevel>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <playerReset@plt>
mov    $0x0,%al
call   1060 <aliensReset@plt>
mov    $0x0,%al
call   1080 <ufoReset@plt>
mov    $0x0,%al
call   1050 <bunkersReset@plt>
mov    $0x0,%al
call   1040 <render@plt>
mov    $0x0,%al
call   1030 <drawscore@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initLevel>:
push   %rax
xor    %eax,%eax
call   1070 <playerReset@plt>
xor    %eax,%eax
call   1060 <aliensReset@plt>
xor    %eax,%eax
call   1080 <ufoReset@plt>
xor    %eax,%eax
call   1050 <bunkersReset@plt>
xor    %eax,%eax
call   1040 <render@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <drawscore@plt>

LLVM IR (-O0):
define void @initLevel() {
%1 = call i32 (...) @playerReset()
%2 = call i32 (...) @aliensReset()
%3 = call i32 (...) @ufoReset()
%4 = call i32 (...) @bunkersReset()
%5 = call i32 (...) @render()
%6 = call i32 (...) @drawscore()
ret void
}

LLVM IR (-O2):
define void @initLevel() {
%1 = tail call i32 (...) @playerReset()
%2 = tail call i32 (...) @aliensReset()
%3 = tail call i32 (...) @ufoReset()
%4 = tail call i32 (...) @bunkersReset()
%5 = tail call i32 (...) @render()
%6 = tail call i32 (...) @drawscore()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a;
  a = (1, 45, 012) >= 12 ? 100 : 200;
  printf("%d\n", a);
  a = 1, 2, 24 <= 12 ? 100 : 200;
  printf("%d\n", a);
  a = (1, 2, 30);
  printf("%d\n", a);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 200)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 30)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void printHash(unsigned char *hash, int len) {
  int i = 0;
  while (i < len) {
    printf("%02x", (unsigned int)hash[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<printHash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <printHash+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printHash+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHash>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <printHash+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printHash+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @printHash(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pidbuf;

/* Variables and functions */
int cg_write(char const *, char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int cg_enter(const char *cgroup, int pid) {
  char pidbuf[64];
  snprintf(pidbuf, sizeof(pidbuf), "%d", pid);
  return cg_write(cgroup, "cgroup.procs", pidbuf);
}


x86 assembly (clang, -O0):
<cg_enter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x40,%esi
lea    0xebe(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    0xead(%rip),%rsi
call   1040 <cg_write@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cg_enter>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0xecd(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x40,%esi
call   1030 <snprintf@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1040 <cg_write@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"cgroup.procs\00"
define i32 @cg_enter(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [64 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @snprintf(i8* %6, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%11 = call i32 @cg_write(i8* %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"cgroup.procs\00"
define i32 @cg_enter(i8* %0, i32 %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @cg_write(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 %6
}
double vdot(double *v1, double *v2) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<vdot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdot>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @vdot(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @vdot(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Type definitions */
struct k_thread {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _mpu_reset_dynamic_regions();
void arc_core_mpu_configure_thread(struct k_thread *thread) {
  _mpu_reset_dynamic_regions();
}


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

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

LLVM IR (-O0):
%struct.k_thread = type { i32 }
define void @arc_core_mpu_configure_thread(%struct.k_thread* %0) {
%2 = alloca %struct.k_thread*
store %struct.k_thread* %0, %struct.k_thread** %2
%3 = call i32 (...) @_mpu_reset_dynamic_regions()
ret void
}

LLVM IR (-O2):
%struct.k_thread = type { i32 }
define void @arc_core_mpu_configure_thread(%struct.k_thread* nocapture readnone %0) {
%2 = tail call i32 (...) @_mpu_reset_dynamic_regions()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ funct(char *);
main() {
  static int ii = 1;
  int jj = 5;
  ii += ++jj;
  funct(ii++ + "Campus Interview");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
add    0x2efa(%rip),%eax
mov    %eax,0x2ef4(%rip)
mov    0x2eee(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2ee3(%rip)
cltq
lea    0xeb2(%rip),%rdi
add    %rax,%rdi
call   1030 <funct@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movslq 0x2f10(%rip),%rax
lea    0x7(%rax),%ecx
mov    %ecx,0x2f07(%rip)
lea    0xed8(%rip),%rcx
lea    (%rax,%rcx,1),%rdi
add    $0x6,%rdi
call   1030 <funct@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@main.ii = internal global i32 1
@.str = [17 x i8] c"Campus Interview\00"
define i32 @main() {
%1 = alloca i32
store i32 5, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
%4 = load i32, i32* @main.ii
%5 = add nsw i32 %4, %3
store i32 %5, i32* @main.ii
%6 = load i32, i32* @main.ii
%7 = add nsw i32 %6, 1
store i32 %7, i32* @main.ii
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %8
%10 = call i32 @funct(i8* %9)
ret i32 0
}

LLVM IR (-O2):
@main.ii = internal unnamed_addr global i32 1
@.str = [17 x i8] c"Campus Interview\00"
define i32 @main() {
%1 = load i32, i32* @main.ii
%2 = add nsw i32 %1, 6
%3 = add nsw i32 %1, 7
store i32 %3, i32* @main.ii
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %4
%6 = tail call i32 @funct(i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int send(int, char *, int, int /*<<< orphan*/);
int strlen(char *);
void sendChat(int SSocket, char *chat) {
  int len = strlen(chat);
  if (send(SSocket, chat, len, 0) == -1) {
    perror("Send");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<sendChat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    $0xffffffff,%eax
jne    1188 <sendChat+0x48>
lea    0xe84(%rip),%rdi
call   1050 <perror@plt>
xor    %edi,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendChat>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    $0xffffffff,%eax
je     116a <sendChat+0x2a>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe8f(%rip),%rdi
call   1050 <perror@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Send\00"
define void @sendChat(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i32 @send(i32 %8, i8* %9, i32 %10, i32 0)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"Send\00"
define void @sendChat(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %3, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
unsigned int wps_pin_checksum(unsigned int);
unsigned int wps_pin_valid(unsigned int pin) {
  return wps_pin_checksum(pin / 10) == (pin % 10);
}


x86 assembly (clang, -O0):
<wps_pin_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%edi
call   1030 <wps_pin_checksum@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    -0x8(%rbp),%eax
cmp    %edx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wps_pin_valid>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    %edi,%eax
mov    $0xcccccccd,%ebx
imul   %rax,%rbx
shr    $0x23,%rbx
mov    %ebx,%edi
call   1030 <wps_pin_checksum@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%ecx
sub    %ecx,%ebp
xor    %ecx,%ecx
cmp    %ebp,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wps_pin_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = udiv i32 %3, 10
%5 = call i32 @wps_pin_checksum(i32 %4)
%6 = load i32, i32* %2
%7 = urem i32 %6, 10
%8 = icmp eq i32 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @wps_pin_valid(i32 %0) {
%2 = udiv i32 %0, 10
%3 = tail call i32 @wps_pin_checksum(i32 %2)
%4 = urem i32 %0, 10
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ nvAbs(int);
int nvDifMod(int a, int b, int m) {
  int x1 = a - b;
  int x2 = (x1 > 0) ? x1 - m : x1 + m;
  return (nvAbs(x1) < nvAbs(x2)) ? x1 : x2;
}


x86 assembly (clang, -O0):
<nvDifMod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1142 <nvDifMod+0x32>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114b <nvDifMod+0x3b>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <nvAbs@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <nvAbs@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <nvDifMod+0x70>
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1186 <nvDifMod+0x76>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvDifMod>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
sub    %esi,%ebx
mov    %edx,%ebp
neg    %ebp
test   %ebx,%ebx
cmovle %edx,%ebp
add    %ebx,%ebp
mov    %ebx,%edi
call   1030 <nvAbs@plt>
mov    %rax,%r14
mov    %ebp,%edi
call   1030 <nvAbs@plt>
cmp    %rax,%r14
cmovl  %ebx,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @nvDifMod(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = sub nsw i32 %15, %16
br label %22
18: ; preds = %3
%19 = load i32, i32* %7
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
br label %22
22: ; preds = %18, %14
%23 = phi i32 [ %17, %14 ], [ %21, %18 ]
store i32 %23, i32* %8
%24 = load i32, i32* %7
%25 = call i64 @nvAbs(i32 %24)
%26 = load i32, i32* %8
%27 = call i64 @nvAbs(i32 %26)
%28 = icmp slt i64 %25, %27
br i1 %28, label %29, label %31
29: ; preds = %22
%30 = load i32, i32* %7
br label %33
31: ; preds = %22
%32 = load i32, i32* %8
br label %33
33: ; preds = %31, %29
%34 = phi i32 [ %30, %29 ], [ %32, %31 ]
ret i32 %34
}

LLVM IR (-O2):
define i32 @nvDifMod(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %0, %1
%5 = icmp sgt i32 %4, 0
%6 = sub i32 0, %2
%7 = select i1 %5, i32 %6, i32 %2
%8 = add i32 %7, %4
%9 = tail call i64 @nvAbs(i32 %4)
%10 = tail call i64 @nvAbs(i32 %8)
%11 = icmp slt i64 %9, %10
%12 = select i1 %11, i32 %4, i32 %8
ret i32 %12
}
void *kmalloc(int size) { return 0; }


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

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

LLVM IR (-O0):
define i8* @kmalloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @kmalloc(i32 %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ write_to_address(int, int /*<<< orphan*/);
void uart_disable() { write_to_address(0x3F201030, 0); }


x86 assembly (clang, -O0):
<uart_disable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f201030,%edi
xor    %esi,%esi
call   1030 <write_to_address@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_disable>:
mov    $0x3f201030,%edi
xor    %esi,%esi
jmp    1030 <write_to_address@plt>

LLVM IR (-O0):
define void @uart_disable() {
%1 = call i32 @write_to_address(i32 1059065904, i32 0)
ret void
}

LLVM IR (-O2):
define void @uart_disable() {
%1 = tail call i32 @write_to_address(i32 1059065904, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf(
      "Controller.o is a program to generate trajectory for a 2wheel\nrobot. "
      "It is licensed with GNU GPL 2.\n---------------------\nTo pass "
      "arguements to the application you can use these options:\n-s : passes "
      "the start coordinates, default values are set with (0,0,90).\n-e : "
      "passes the destiation coordinates. must be set.\n-h : show you this "
      "help.\nExample:\ncontroller.o -s 0,0,90  -e 1,1,-90\nwill give you the "
      "trajectory from 0,0,looking upward (x,y) to 1,1 looking downward.\n");
}


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

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

LLVM IR (-O0):
@.str = [467 x i8] c"Controller.o is a program to generate trajectory for a 2wheel\0Arobot. It is licensed with GNU GPL 2.\0A---------------------\0ATo pass arguements to the application you can use these options:\0A-s : passes the start coordinates, default values are set with (0,0,90).\0A-e : passes the destiation coordinates. must be set.\0A-h : show you this help.\0AExample:\0Acontroller.o -s 0,0,90 -e 1,1,-90\0Awill give you the trajectory from 0,0,looking upward (x,y) to 1,1 looking downward.\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([467 x i8], [467 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [466 x i8] c"Controller.o is a program to generate trajectory for a 2wheel\0Arobot. It is licensed with GNU GPL 2.\0A---------------------\0ATo pass arguements to the application you can use these options:\0A-s : passes the start coordinates, default values are set with (0,0,90).\0A-e : passes the destiation coordinates. must be set.\0A-h : show you this help.\0AExample:\0Acontroller.o -s 0,0,90 -e 1,1,-90\0Awill give you the trajectory from 0,0,looking upward (x,y) to 1,1 looking downward.\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([466 x i8], [466 x i8]* @str, i64 0, i64 0))
ret void
}