xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ noraw();
scalar_t__ ui_cancellation_enabled();
void ui_cancellation_resume(int state) {
  if (state) {
    assert(ui_cancellation_enabled() && "Invalid cancellation resume");
    noraw();
  }
}


x86 assembly (clang, -O0):
<ui_cancellation_resume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     117c <ui_cancellation_resume+0x4c>
mov    $0x0,%al
call   1030 <ui_cancellation_enabled@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1168 <ui_cancellation_resume+0x38>
mov    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1168 <ui_cancellation_resume+0x38>
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x0,%al
call   1040 <noraw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ui_cancellation_resume>:
test   %edi,%edi
je     1152 <ui_cancellation_resume+0x22>
push   %rax
xor    %eax,%eax
call   1030 <ui_cancellation_enabled@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <noraw@plt>
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Invalid cancellation resume\00"
define void @ui_cancellation_resume(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = call i64 (...) @ui_cancellation_enabled()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
br label %9
9: ; preds = %8, %5
%10 = phi i1 [ false, %5 ], [ true, %8 ]
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 (...) @noraw()
br label %14
14: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @ui_cancellation_resume(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 (...) @ui_cancellation_enabled()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 (...) @noraw()
br label %9
9: ; preds = %3, %1
ret void
}
long ptrtosi(ptr)
long ptr;
{ return ((ptr & 0xff0000) << 8) | (ptr & 0xffff); }


x86 assembly (clang, -O0):
<ptrtosi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff0000,%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%rcx
and    $0xffff,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrtosi>:
movzwl %di,%eax
and    $0xff0000,%edi
shl    $0x8,%rdi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ptrtosi(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 16711680
%5 = shl i64 %4, 8
%6 = load i64, i64* %2
%7 = and i64 %6, 65535
%8 = or i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @ptrtosi(i64 %0) {
%2 = shl i64 %0, 8
%3 = and i64 %2, 4278190080
%4 = and i64 %0, 65535
%5 = or i64 %3, %4
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ data_clr(int, int);
void usb_off() { data_clr(2, 3); }


x86 assembly (clang, -O0):
<usb_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <data_clr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_off>:
mov    $0x2,%edi
mov    $0x3,%esi
jmp    1030 <data_clr@plt>

LLVM IR (-O0):
define void @usb_off() {
%1 = call i32 @data_clr(i32 2, i32 3)
ret void
}

LLVM IR (-O2):
define void @usb_off() {
%1 = tail call i32 @data_clr(i32 2, i32 3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void gen_filter_stop(FILE *outfile) { fprintf(outfile, "}\n"); }


x86 assembly (clang, -O0):
<gen_filter_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_filter_stop>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"}\0A\00"
define void @gen_filter_stop(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 2, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, unsigned int);
scalar_t__ strlen(char const *);
void cmdshell_print_status_password(const char *password) {
  printf("\n"
         "Password (in angle brackets):\n"
         "<%s>\n"
         "%u characters\n",
         password, (unsigned)strlen(password));
}


x86 assembly (clang, -O0):
<cmdshell_print_status_password>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdshell_print_status_password>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"\0APassword (in angle brackets):\0A<%s>\0A%u characters\0A\00"
define void @cmdshell_print_status_password(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"\0APassword (in angle brackets):\0A<%s>\0A%u characters\0A\00"
define void @cmdshell_print_status_password(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int errno;
int execvp(char *, char **);
int /*<<< orphan*/ printf(char *, char *, int);
int execute(char *args[]) {
  int err = execvp(args[0], args);
  if (err < 0) {
    printf("Error running %s, errno:%d\n", args[0], errno);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <execvp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1171 <execute+0x51>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    0x2e89(%rip),%rax
mov    (%rax),%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1178 <execute+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    %rbx,%rsi
call   1040 <execvp@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
js     113c <execute+0x1c>
pop    %rbx
ret
mov    (%rbx),%rsi
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"Error running %s, errno:%d\0A\00"
@errno = global i32 0
define i32 @execute(i8** %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @execvp(i8* %2, i8** %0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %0
%7 = load i32, i32* @errno
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ 0, %5 ], [ 1, %1 ]
ret i32 %10
}
void main() {
  int N = 5;
  int a[N];
  int i;
  switch (2) {
  case 0:
    for (i = 0; i < N; ++i) {
      a[i] = i;
    }
    break;
  case 1:
    for (i = (N - 1); i >= 0; --i)
      a[i] = N - 1 - i;
    break;
  case 2:
    for (i = 0; i < N; ++i)
      a[i] = i;
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1165 <main+0x65>
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%edx
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113d <main+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
int foo(int a, int b) {
  int c = a;
  if (c) {
    c += a;
  }
  return c;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1123 <foo+0x23>
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = shl i32 %0, 1
ret i32 %3
}
/* Type definitions */
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ errno;
struct dirent *readdir(int /*<<< orphan*/ *);
struct dirent *xreaddir(DIR *d) {
  struct dirent *de;
  errno = 0;
  de = readdir(d);
  assert(de || errno == 0);
  return de;
}


x86 assembly (clang, -O0):
<xreaddir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <readdir@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jne    1168 <xreaddir+0x48>
mov    0x2e82(%rip),%rax
cmpq   $0x0,(%rax)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xreaddir>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
movq   $0x0,(%r14)
call   1040 <readdir@plt>
mov    %rax,%rbx
test   %rax,%rax
setne  %al
cmpq   $0x0,(%r14)
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
@errno = global i64 0
define %struct.dirent* @xreaddir(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.dirent*
store i32* %0, i32** %2
store i64 0, i64* @errno
%4 = load i32*, i32** %2
%5 = call %struct.dirent* @readdir(i32* %4)
store %struct.dirent* %5, %struct.dirent** %3
%6 = load %struct.dirent*, %struct.dirent** %3
%7 = icmp ne %struct.dirent* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i64, i64* @errno
%10 = icmp eq i64 %9, 0
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ true, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load %struct.dirent*, %struct.dirent** %3
ret %struct.dirent* %15
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@errno = global i64 0
define %struct.dirent* @xreaddir(i32* %0) {
store i64 0, i64* @errno
%2 = tail call %struct.dirent* @readdir(i32* %0)
%3 = icmp ne %struct.dirent* %2, null
%4 = load i64, i64* @errno
%5 = icmp eq i64 %4, 0
%6 = select i1 %3, i1 true, i1 %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret %struct.dirent* %2
}
/* Variables and functions */
int /*<<< orphan*/ uart_1_puts(char *);
void hc05_puts(char *str) {
  uart_1_puts(str);
  return;
}


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

x86 assembly (clang, -O2):
<hc05_puts>:
jmp    1030 <uart_1_puts@plt>

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

LLVM IR (-O2):
define void @hc05_puts(i8* %0) {
%2 = tail call i32 @uart_1_puts(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int /*<<< orphan*/ thr3(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr1(0);
__CPROVER_ASYNC_1:
  thr2(0);
__CPROVER_ASYNC_2:
  thr3(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1040 <thr2@plt>
xor    %edi,%edi
call   1050 <thr3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1040 <thr2@plt>
xor    %edi,%edi
call   1050 <thr3@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @thr1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @thr2(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @thr3(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr1(i32 0)
%2 = tail call i32 @thr2(i32 0)
%3 = tail call i32 @thr3(i32 0)
ret i32 0
}
/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_short(short const k1, short const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_short>:
xor    %eax,%eax
cmp    %si,%di
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_short(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = icmp slt i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_short(i16 signext %0, i16 signext %1) {
%3 = icmp slt i16 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double Rand();
void iran8(int *i, int *j) {
  *i = Rand() * 8.0 + 1.0;
  *j = Rand() * 8.0 + 1.0;
}


x86 assembly (clang, -O0):
<iran8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <Rand@plt>
movsd  0xed1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecd(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <Rand@plt>
movsd  0xea8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iran8>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <Rand@plt>
mulsd  0xed7(%rip),%xmm0
addsd  0xed7(%rip),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,(%rbx)
xor    %eax,%eax
call   1030 <Rand@plt>
mulsd  0xeba(%rip),%xmm0
addsd  0xeba(%rip),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @iran8(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call double (...) @Rand()
%6 = call double @llvm.fmuladd.f64(double %5, double 8.000000e+00, double 1.000000e+00)
%7 = fptosi double %6 to i32
%8 = load i32*, i32** %3
store i32 %7, i32* %8
%9 = call double (...) @Rand()
%10 = call double @llvm.fmuladd.f64(double %9, double 8.000000e+00, double 1.000000e+00)
%11 = fptosi double %10 to i32
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @iran8(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call double (...) @Rand()
%4 = tail call double @llvm.fmuladd.f64(double %3, double 8.000000e+00, double 1.000000e+00)
%5 = fptosi double %4 to i32
store i32 %5, i32* %0
%6 = tail call double (...) @Rand()
%7 = tail call double @llvm.fmuladd.f64(double %6, double 8.000000e+00, double 1.000000e+00)
%8 = fptosi double %7 to i32
store i32 %8, i32* %1
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *ltsv_strndup(const char *string, size_t n) {
  char *output_string = (char *)malloc(n + 1);
  if (!output_string) {
    return NULL;
  }
  output_string[n] = '\0';
  strncpy(output_string, string, n);
  return output_string;
}


x86 assembly (clang, -O0):
<ltsv_strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1159 <ltsv_strndup+0x39>
movq   $0x0,-0x8(%rbp)
jmp    117e <ltsv_strndup+0x5e>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltsv_strndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     1151 <ltsv_strndup+0x31>
mov    %rax,%rbx
movb   $0x0,(%rax,%r14,1)
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
jmp    1153 <ltsv_strndup+0x33>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @ltsv_strndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %5, i64 %1
store i8 0, i8* %8
%9 = tail call i32 @strncpy(i8* %5, i8* %0, i64 %1)
br label %10
10: ; preds = %2, %7
%11 = phi i8* [ %5, %7 ], [ null, %2 ]
ret i8* %11
}
/* Variables and functions */
scalar_t__ floor(double);
double qui(double phase) {
  phase -= floor(phase + 0.5);
  double x2 = phase * phase;
  return phase * (5.96255602510703402 -
                  x2 * (34.0717487148973373 - 40.8860984578768047 * x2));
}


x86 assembly (clang, -O0):
<qui>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
cvtsi2sd %rax,%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  0xea0(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe9c(%rip),%xmm3
addsd  %xmm3,%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe65(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qui>:
push   %rax
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  0xede(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1030 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm0
movsd  0xeb8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeb4(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @qui(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fadd double %4, 5.000000e-01
%6 = call i64 @floor(double %5)
%7 = sitofp i64 %6 to double
%8 = load double, double* %2
%9 = fsub double %8, %7
store double %9, double* %2
%10 = load double, double* %2
%11 = load double, double* %2
%12 = fmul double %10, %11
store double %12, double* %3
%13 = load double, double* %2
%14 = load double, double* %3
%15 = load double, double* %3
%16 = call double @llvm.fmuladd.f64(double 0xC044716BAC9CCEF7, double %15, double 0x4041092F0FD801CE)
%17 = fneg double %14
%18 = call double @llvm.fmuladd.f64(double %17, double %16, double 0x4017D9A849619C20)
%19 = fmul double %13, %18
ret double %19
}

LLVM IR (-O2):
define double @qui(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call i64 @floor(double %2)
%4 = sitofp i64 %3 to double
%5 = fsub double %0, %4
%6 = fmul double %5, %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double 0xC044716BAC9CCEF7, double 0x4041092F0FD801CE)
%8 = fneg double %6
%9 = tail call double @llvm.fmuladd.f64(double %8, double %7, double 0x4017D9A849619C20)
%10 = fmul double %5, %9
ret double %10
}
int do_808() { return 808; }


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

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

LLVM IR (-O0):
define i32 @do_808() {
ret i32 808
}

LLVM IR (-O2):
define i32 @do_808() {
ret i32 808
}
/* Variables and functions */
#define SIGTERM 128
void signalHandler(int signal) {
  switch (signal) {
  case SIGTERM:
    break;
  }
}


x86 assembly (clang, -O0):
<signalHandler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x80,%eax
jne    111f <signalHandler+0x1f>
jmp    111a <signalHandler+0x1a>
jmp    111f <signalHandler+0x1f>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @signalHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %5 [
i32 128, label %4
]
4: ; preds = %1
br label %5
5: ; preds = %1, %4
ret void
}

LLVM IR (-O2):
define void @signalHandler(i32 %0) {
ret void
}
void aVoidFct() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_source_set_callback_indirect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ baz_call();
void baz() { baz_call(); }


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

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

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

LLVM IR (-O2):
define void @baz() {
%1 = tail call i32 (...) @baz_call()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sigint_handler(int32_t sig) { exit(0); }


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<sigint_handler>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @sigint_handler(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
void pzgstrf_StackFree() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_stop_editing() {
ret void
}
/* Variables and functions */
scalar_t__ EAGAIN;
scalar_t__ errno;
int read(int, char *, size_t);
int read_from_pipe(int fd, char *data, size_t max_len) {
  int bytes_read = read(fd, data, max_len);
  if (bytes_read == -1) {
    bytes_read = (errno == EAGAIN) ? 0 : -1;
  }
  return bytes_read;
}


x86 assembly (clang, -O0):
<read_from_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1164 <read_from_pipe+0x54>
mov    0x2e99(%rip),%rax
mov    (%rax),%rdx
mov    0x2e7f(%rip),%rax
mov    (%rax),%rsi
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_from_pipe>:
push   %rax
call   1030 <read@plt>
mov    0x2ec3(%rip),%rcx
mov    (%rcx),%rcx
mov    0x2ea9(%rip),%rdx
xor    %esi,%esi
cmp    (%rdx),%rcx
setne  %sil
neg    %esi
cmp    $0xffffffff,%eax
cmove  %esi,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@EAGAIN = global i64 0
define i32 @read_from_pipe(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @read(i32 %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %20
14: ; preds = %3
%15 = load i64, i64* @errno
%16 = load i64, i64* @EAGAIN
%17 = icmp eq i64 %15, %16
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 0, i32 -1
store i32 %19, i32* %7
br label %20
20: ; preds = %14, %3
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
@errno = global i64 0
@EAGAIN = global i64 0
define i32 @read_from_pipe(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, -1
%6 = load i64, i64* @errno
%7 = load i64, i64* @EAGAIN
%8 = icmp ne i64 %6, %7
%9 = sext i1 %8 to i32
%10 = select i1 %5, i32 %9, i32 %4
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ send_to_child(int, char *);
char *strtok(char *, char *);
int /*<<< orphan*/ user_part(int, int /*<<< orphan*/ *, char *);
void server_quit(int cid, char *p) {
  char *nick;
  nick = strtok(p, " ");
  user_part(cid, NULL, nick);
  send_to_child(cid, "OK QUIT");
}


x86 assembly (clang, -O0):
<server_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <user_part@plt>
mov    -0x4(%rbp),%edi
lea    0xe95(%rip),%rsi
call   1030 <send_to_child@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<server_quit>:
push   %rbx
mov    %rsi,%rax
mov    %edi,%ebx
lea    0xec3(%rip),%rsi
mov    %rax,%rdi
call   1050 <strtok@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    %rax,%rdx
call   1040 <user_part@plt>
lea    0xeaa(%rip),%rsi
mov    %ebx,%edi
pop    %rbx
jmp    1030 <send_to_child@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [8 x i8] c"OK QUIT\00"
define void @server_quit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i8* @strtok(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %5
%10 = call i32 @user_part(i32 %8, i32* null, i8* %9)
%11 = load i32, i32* %3
%12 = call i32 @send_to_child(i32 %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [8 x i8] c"OK QUIT\00"
define void @server_quit(i32 %0, i8* %1) {
%3 = tail call i8* @strtok(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @user_part(i32 %0, i32* null, i8* %3)
%5 = tail call i32 @send_to_child(i32 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int cs_nonzero(int i, int j, double aij, void *other) { return (aij != 0); }


x86 assembly (clang, -O0):
<cs_nonzero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs_nonzero>:
xorpd  %xmm1,%xmm1
cmpneqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @cs_nonzero(i32 %0, i32 %1, double %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store double %2, double* %7
store i8* %3, i8** %8
%9 = load double, double* %7
%10 = fcmp une double %9, 0.000000e+00
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @cs_nonzero(i32 %0, i32 %1, double %2, i8* nocapture readnone %3) {
%5 = fcmp une double %2, 0.000000e+00
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ RFA1RadioP__SoftwareAckConfig__reportChannelError();
void SoftwareAckLayerC__0__Config__reportChannelError(void) {
  RFA1RadioP__SoftwareAckConfig__reportChannelError();
}


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

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

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

LLVM IR (-O2):
define void @SoftwareAckLayerC__0__Config__reportChannelError() {
%1 = tail call i32 (...) @RFA1RadioP__SoftwareAckConfig__reportChannelError()
ret void
}
main() {
  char x[200];
  return sizeof(0, x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%eax
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
ret i32 8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ Platform_Halt(int);
int errno;
scalar_t__ fsync(long long);
int Platform_Sync(long long h) {
  int _o_result;
  if (fsync(h) < 0) {
    _o_result = errno;
    return _o_result;
  } else {
    _o_result = 0;
    return _o_result;
  }
__retchk:
  Platform_Halt(-3);
  return 0;
  ;
}


x86 assembly (clang, -O0):
<Platform_Sync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fsync@plt>
cmp    $0x0,%rax
jge    1146 <Platform_Sync+0x36>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <Platform_Sync+0x43>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Platform_Sync>:
push   %rax
call   1030 <fsync@plt>
mov    0x2ec3(%rip),%rcx
sar    $0x3f,%rax
and    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @Platform_Sync(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = call i64 @fsync(i64 %5)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @errno
store i32 %9, i32* %4
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %15
11: ; preds = %1
store i32 0, i32* %4
%12 = load i32, i32* %4
store i32 %12, i32* %2
br label %15
13: ; No predecessors!
%14 = call i32 @Platform_Halt(i32 -3)
store i32 0, i32* %2
br label %15
15: ; preds = %13, %11, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @Platform_Sync(i64 %0) {
%2 = tail call i64 @fsync(i64 %0)
%3 = icmp slt i64 %2, 0
%4 = load i32, i32* @errno
%5 = select i1 %3, i32 %4, i32 0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ setDefaultParameters();
int /*<<< orphan*/ updateAllParameters();
void setDefaultParametersAndUpdate() {
  setDefaultParameters();
  updateAllParameters();
}


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

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

LLVM IR (-O0):
define void @setDefaultParametersAndUpdate() {
%1 = call i32 (...) @setDefaultParameters()
%2 = call i32 (...) @updateAllParameters()
ret void
}

LLVM IR (-O2):
define void @setDefaultParametersAndUpdate() {
%1 = tail call i32 (...) @setDefaultParameters()
%2 = tail call i32 (...) @updateAllParameters()
ret void
}
void EVP_CIPHER_param_to_asn1(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_param_to_asn1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ back_up(int);
int /*<<< orphan*/ print_spaces(int);
void erase_chars(int num) {
  back_up(num);
  print_spaces(num);
  back_up(num);
}


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

x86 assembly (clang, -O2):
<erase_chars>:
push   %rbx
mov    %edi,%ebx
call   1040 <back_up@plt>
mov    %ebx,%edi
call   1030 <print_spaces@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <back_up@plt>

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

LLVM IR (-O2):
define void @erase_chars(i32 %0) {
%2 = tail call i32 @back_up(i32 %0)
%3 = tail call i32 @print_spaces(i32 %0)
%4 = tail call i32 @back_up(i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
scalar_t__ fread(int *, int, int, int /*<<< orphan*/ *);
int getw(FILE *f) {
  int x;
  return fread(&x, sizeof x, 1, f) ? x : EOF;
}


x86 assembly (clang, -O0):
<getw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x0,%rax
je     1148 <getw+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <getw+0x44>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getw>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rcx
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
test   %rax,%rax
jne    113b <getw+0x2b>
mov    0x2ead(%rip),%rbx
mov    (%rbx),%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @getw(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @fread(i32* %2, i32 4, i32 1, i32* %0)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* %2
%7 = load i32, i32* @EOF
%8 = select i1 %5, i32 %7, i32 %6
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
uint64_t unpack_from_h64(const void *v) {
  uint64_t u;
  memcpy(&u, v, sizeof(uint64_t));
  return u;
}


x86 assembly (clang, -O0):
<unpack_from_h64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_from_h64>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @unpack_from_h64(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i32* %3, i8* %4, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @unpack_from_h64(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
char nextGreatestLetter(char *letters, int lettersSize, char target) {
  for (int i = 0; i < lettersSize; ++i) {
    char c = letters[i];
    if (c > target) {
      return c;
    }
  }
  return letters[0];
}


x86 assembly (clang, -O0):
<nextGreatestLetter>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %al,-0x15(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115f <nextGreatestLetter+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1d(%rbp)
movsbl -0x1d(%rbp),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
jle    114c <nextGreatestLetter+0x4c>
mov    -0x1d(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1168 <nextGreatestLetter+0x68>
jmp    1151 <nextGreatestLetter+0x51>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <nextGreatestLetter+0x17>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextGreatestLetter>:
test   %esi,%esi
jle    1121 <nextGreatestLetter+0x21>
mov    %esi,%ecx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rsi,1),%eax
cmp    %dl,%al
jg     1123 <nextGreatestLetter+0x23>
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    1110 <nextGreatestLetter+0x10>
mov    (%rdi),%al
ret

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

LLVM IR (-O2):
define signext i8 @nextGreatestLetter(i8* nocapture %0, i32 %1, i8 signext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp sgt i8 %12, %2
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %17, label %7
15: ; preds = %7, %3
%16 = load i8, i8* %0
br label %17
17: ; preds = %9, %15
%18 = phi i8 [ %16, %15 ], [ %12, %9 ]
ret i8 %18
}
/* Variables and functions */
int /*<<< orphan*/ cgi_error(char *, char const *);
int strlen(char const *);
int cgi_check_strlen(char const *string) {
  if (strlen(string) > 32) {
    cgi_error("Name exceeds 32 characters limit: %s", string);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cgi_check_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x20,%eax
jle    115a <cgi_check_strlen+0x3a>
mov    -0x10(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1040 <cgi_error@plt>
movl   $0x1,-0x4(%rbp)
jmp    1161 <cgi_check_strlen+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgi_check_strlen>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x21,%ecx
jl     1146 <cgi_check_strlen+0x26>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <cgi_error@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Name exceeds 32 characters limit: %s\00"
define i32 @cgi_check_strlen(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp sgt i32 %5, 32
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @cgi_error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %8)
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [37 x i8] c"Name exceeds 32 characters limit: %s\00"
define i32 @cgi_check_strlen(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 32
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @cgi_error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ printf(char *, void *);
int main(void) {
  void *addr = malloc(1);
  printf("%p\n", addr);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <malloc@plt>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
int driver_register(struct device_driver *drv) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.device_driver = type opaque
define i32 @driver_register(%struct.device_driver* %0) {
%2 = alloca %struct.device_driver*
%3 = alloca i32
store %struct.device_driver* %0, %struct.device_driver** %2
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.device_driver = type opaque
define i32 @driver_register(%struct.device_driver* nocapture readnone %0) {
ret i32 undef
}
int execute_setregid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_setregid() {
ret i32 0
}