xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_error(void) {
  printf("Error setting new values. Common errors:\n"
         "- Do you have proper administration rights? (super-user?)\n"
         "- Is the governor you requested available and modprobed?\n"
         "- Trying to set an invalid policy?\n"
         "- Trying to set a specific frequency, but userspace governor is not "
         "available,\n"
         "   for example because of hardware which cannot be set to a specific "
         "frequency\n"
         "   or because the userspace governor isn't loaded?\n");
}


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

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

LLVM IR (-O0):
@.str = [401 x i8] c"Error setting new values. Common errors:\0A- Do you have proper administration rights? (super-user?)\0A- Is the governor you requested available and modprobed?\0A- Trying to set an invalid policy?\0A- Trying to set a specific frequency, but userspace governor is not available,\0A for example because of hardware which cannot be set to a specific frequency\0A or because the userspace governor isn't loaded?\0A\00"
define void @print_error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([401 x i8], [401 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [400 x i8] c"Error setting new values. Common errors:\0A- Do you have proper administration rights? (super-user?)\0A- Is the governor you requested available and modprobed?\0A- Trying to set an invalid policy?\0A- Trying to set a specific frequency, but userspace governor is not available,\0A for example because of hardware which cannot be set to a specific frequency\0A or because the userspace governor isn't loaded?\00"
define void @print_error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([400 x i8], [400 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ safe_printf(char *, unsigned long);
void tap_version(unsigned long version) {
  if (version > 12) {
    safe_printf("TAP version %lu\n", version);
  }
}


x86 assembly (clang, -O0):
<tap_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0xc,-0x8(%rbp)
jbe    1137 <tap_version+0x27>
mov    -0x8(%rbp),%rsi
lea    0xece(%rip),%rdi
call   1030 <safe_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tap_version>:
cmp    $0xd,%rdi
jb     1125 <tap_version+0x15>
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
jmp    1030 <safe_printf@plt>
ret

LLVM IR (-O0):
@.str = [17 x i8] c"TAP version %lu\0A\00"
define void @tap_version(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, 12
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i32 @safe_printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"TAP version %lu\0A\00"
define void @tap_version(i64 %0) {
%2 = icmp ugt i64 %0, 12
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @safe_printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ ui2a(int, int, int /*<<< orphan*/, char *);
int i2a(int num, char *bf) {
  int n = 0;
  if (num < 0) {
    num = -num;
    *bf++ = '-';
    n = 1;
  }
  n += ui2a(num, 10, 0, bf);
  return n;
}


x86 assembly (clang, -O0):
<i2a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1151 <i2a+0x41>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
movl   $0x1,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    $0xa,%esi
xor    %edx,%edx
call   1030 <ui2a@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2a>:
push   %rbx
mov    %rsi,%rcx
test   %edi,%edi
js     111c <i2a+0xc>
xor    %ebx,%ebx
jmp    112a <i2a+0x1a>
neg    %edi
movb   $0x2d,(%rcx)
add    $0x1,%rcx
mov    $0x1,%ebx
mov    $0xa,%esi
xor    %edx,%edx
call   1030 <ui2a@plt>
add    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @i2a(i32 %0, i8* %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = sub nsw i32 0, %0
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
br label %7
7: ; preds = %4, %2
%8 = phi i32 [ %5, %4 ], [ %0, %2 ]
%9 = phi i8* [ %6, %4 ], [ %1, %2 ]
%10 = phi i64 [ 1, %4 ], [ 0, %2 ]
%11 = tail call i64 @ui2a(i32 %8, i32 10, i32 0, i8* %9)
%12 = add nsw i64 %11, %10
%13 = trunc i64 %12 to i32
ret i32 %13
}
/* Variables and functions */
scalar_t__ errno;
int clear_errno() { errno = 0; }


x86 assembly (clang, -O0):
<clear_errno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
movq   $0x0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_errno>:
mov    0x2ed9(%rip),%rax
movq   $0x0,(%rax)
ret

LLVM IR (-O0):
@errno = global i64 0
define i32 @clear_errno() {
%1 = alloca i32
store i64 0, i64* @errno
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @clear_errno() {
store i64 0, i64* @errno
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  puts("Hello, World!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int cw1200_can_suspend(struct cw1200_common *priv) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.cw1200_common = type opaque
define i32 @cw1200_can_suspend(%struct.cw1200_common* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int strcmp(char *, char *);
char *strpbrk(char *, char *);
int file_ext(char filenm[], char filext[]) {
  char *ptr;
  ptr = strpbrk(filenm, ".");
  ptr;
  if (ptr == NULL)
    return (-1);
  else {
    ptr++;
    return (strcmp(ptr, filext));
  }
}


x86 assembly (clang, -O0):
<file_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strpbrk@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115b <file_ext+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <file_ext+0x57>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_ext>:
push   %rbx
mov    %rsi,%rbx
mov    $0x2e,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1143 <file_ext+0x23>
add    $0x1,%rax
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <strcmp@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @file_ext(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 46)
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = tail call i32 @strcmp(i8* %6, i8* dereferenceable(1) %1)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: pick-test [-k keys] [-- argument ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"usage: pick-test [-k keys] [-- argument ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"usage: pick-test [-k keys] [-- argument ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double asin(double);
double intr_wrap_008(double p1) { return asin(p1); }


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

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

LLVM IR (-O0):
define double @intr_wrap_008(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @asin(double %3)
ret double %4
}

LLVM IR (-O2):
define double @intr_wrap_008(double %0) {
%2 = tail call double @asin(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void om_text_print_title(FILE *fp, char *title) {
  fprintf(fp, "=== %s ===\n", title);
}


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

x86 assembly (clang, -O2):
<om_text_print_title>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"=== %s ===\0A\00"
define void @om_text_print_title(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ result;

/* Variables and functions */
int /*<<< orphan*/ xdirname_r(char *, char *, int);
char *dirname(char *path) {
  static char result[1024];
  (void)xdirname_r(path, result, sizeof(result));
  return result;
}


x86 assembly (clang, -O0):
<dirname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f19(%rip),%rsi
mov    $0x400,%edx
call   1030 <xdirname_r@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirname>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rsi
mov    $0x400,%edx
call   1030 <xdirname_r@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@dirname.result = internal global [1024 x i8] zeroinitializer
define i8* @dirname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @xdirname_r(i8* %3, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dirname.result, i64 0, i64 0), i32 1024)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dirname.result, i64 0, i64 0)
}

LLVM IR (-O2):
@dirname.result = internal global [1024 x i8] zeroinitializer
define i8* @dirname(i8* %0) {
%2 = tail call i32 @xdirname_r(i8* %0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dirname.result, i64 0, i64 0), i32 1024)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @dirname.result, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int getpid();
int /*<<< orphan*/ printf(char *, int);
void fork8() {
  if (fork() == 0) {
    printf("Running Child, PID = %d\n", getpid());
    while (1)
      ;
  } else {
    printf("Terminating Parent, PID = %d\n", getpid());
    exit(0);
  }
}


x86 assembly (clang, -O0):
<fork8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <fork@plt>
cmp    $0x0,%rax
jne    116f <fork8+0x2f>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
jmp    116a <fork8+0x2a>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fork8>:
push   %rbx
xor    %eax,%eax
call   1060 <fork@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
test   %rbx,%rbx
jne    1172 <fork8+0x32>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1170 <fork8+0x30>
lea    0xea0(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Running Child, PID = %d\0A\00"
@.str.1 = [30 x i8] c"Terminating Parent, PID = %d\0A\00"
define void @fork8() {
%1 = call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @getpid()
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %3, %6
br label %6
7: ; preds = %0
%8 = call i32 (...) @getpid()
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Running Child, PID = %d\0A\00"
@.str.1 = [30 x i8] c"Terminating Parent, PID = %d\0A\00"
define void @fork8() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
%3 = tail call i32 (...) @getpid()
br i1 %2, label %4, label %7
4: ; preds = %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %6
6: ; preds = %4, %6
br label %6
7: ; preds = %0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%9 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ lround(double);
long lroundl(long double x) { return (long double)lround((double)x); }


x86 assembly (clang, -O0):
<lroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <lround@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lroundl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <lround@plt>

LLVM IR (-O0):
define i64 @lroundl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @lround(double %4)
%6 = sitofp i64 %5 to x86_fp80
%7 = fptosi x86_fp80 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @lroundl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @lround(double %2)
ret i64 %3
}
void rotate(char *str, int len) {
  char c;
  int i;
  c = str[0];
  for (i = 0; i < len - 1; ++i) {
    str[i] = str[i + 1];
  }
  str[i] = c;
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1155 <rotate+0x55>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <rotate+0x1b>
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    (%rdi),%bpl
cmp    $0x2,%esi
jl     1135 <rotate+0x25>
mov    %esi,%ebx
add    $0xffffffff,%ebx
lea    0x1(%r14),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <memmove@plt>
jmp    1137 <rotate+0x27>
xor    %ebx,%ebx
mov    %bpl,(%r14,%rbx,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @rotate(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = add nsw i32 %1, -1
%7 = getelementptr i8, i8* %0, i64 1
%8 = zext i32 %6 to i64
%9 = add nsw i32 %1, -1
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %5, %2
%12 = phi i64 [ 0, %2 ], [ %10, %5 ]
%13 = getelementptr inbounds i8, i8* %0, i64 %12
store i8 %3, i8* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *, char const *);
scalar_t__ rename(char const *, char const *);
void dorename(const char *oldfile, const char *newfile) {
  if (rename(oldfile, newfile)) {
    err(1, "%s or %s", oldfile, newfile);
  }
}


x86 assembly (clang, -O0):
<dorename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <rename@plt>
cmp    $0x0,%rax
je     1160 <dorename+0x40>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x1,%edi
lea    0xea5(%rip),%rsi
call   1030 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dorename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <rename@plt>
test   %rax,%rax
je     1152 <dorename+0x32>
lea    0xec5(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <err@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s or %s\00"
define void @dorename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @rename(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s or %s\00"
define void @dorename(i8* %0, i8* %1) {
%3 = tail call i64 @rename(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
char *_strrchr(char *, char);
int /*<<< orphan*/ printf(char *, char);
int main() {
  char *s = "apple";
  char c = 'l';
  char *p = _strrchr(s, c);
  printf("%c\n", *p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
movb   $0x6c,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1040 <_strrchr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
lea    0xeac(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"apple\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call i8* @_strrchr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 108)
%2 = load i8, i8* %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %2)
ret i32 0
}
/* Variables and functions */
float atanf(float);
float __ratand(float x) { return (atanf(x) * 57.29577951308232F); }


x86 assembly (clang, -O0):
<__ratand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <atanf@plt>
movss  0xed1(%rip),%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ratand>:
push   %rax
call   1030 <atanf@plt>
mulss  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @__ratand(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @atanf(float %3)
%5 = fmul float %4, 0x404CA5DC20000000
ret float %5
}

LLVM IR (-O2):
define float @__ratand(float %0) {
%2 = tail call float @atanf(float %0)
%3 = fmul float %2, 0x404CA5DC20000000
ret float %3
}
/* Type definitions */
typedef scalar_t__ uint;

/* Variables and functions */
uint _h2_uintmax3(uint x, uint y, uint z) {
  return (x < y ? (y < z ? z : y) : (x < z ? z : x));
}


x86 assembly (clang, -O0):
<_h2_uintmax3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    114e <_h2_uintmax3+0x4e>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1139 <_h2_uintmax3+0x39>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1141 <_h2_uintmax3+0x41>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1179 <_h2_uintmax3+0x79>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1169 <_h2_uintmax3+0x69>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1171 <_h2_uintmax3+0x71>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @_h2_uintmax3(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %1, %2
%5 = select i1 %4, i64 %2, i64 %1
%6 = icmp sgt i64 %5, %0
%7 = select i1 %6, i64 %5, i64 %0
ret i64 %7
}
void iniciaOperacao() {}


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

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

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

LLVM IR (-O2):
define void @iniciaOperacao() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ width;
};
typedef TYPE_1__ XCharStruct;

/* Variables and functions */
short get_XCharStruct_width(void *_p) {
  return (short)((XCharStruct *)_p)->width;
}


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

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

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

LLVM IR (-O2):
define signext i16 @get_XCharStruct_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Hello world !\r\n");
  puts("UART works well...\r\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello world !\0D\0A\00"
@.str.1 = [21 x i8] c"UART works well...\0D\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Hello world !\0D\0A\00"
@.str.1 = [21 x i8] c"UART works well...\0D\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int floor(int);
int main(void) {
  bool result = 2 > 1 ? true : false;
  char *somestring = "sadsdasd";
  int someinteger = floor(100 + 350);
  if (1 > 2) {
    return 0;
  } else if (2 == 2) {
    goto finish;
  } else {
    return 2;
  }
finish:
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x1c2,%edi
call   1030 <floor@plt>
mov    %eax,-0x14(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1c2,%edi
call   1030 <floor@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"sadsdasd\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = call i32 @floor(i32 450)
store i32 %5, i32* %4
br label %6
6: ; preds = %0
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @floor(i32 450)
ret i32 1
}
int test_imm_ACuint8_mem(unsigned char *val) {
  return ((*val) & (-0xAC << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_ACuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 84
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
_Complex int bar(int a) { return (a & 8) ? (_Complex int)16 : (_Complex int)0; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1128 <bar+0x28>
mov    $0x10,%ecx
xor    %eax,%eax
mov    %ecx,-0x14(%rbp)
mov    %eax,-0x10(%rbp)
jmp    1137 <bar+0x37>
xor    %eax,%eax
mov    %eax,%ecx
mov    %ecx,-0x14(%rbp)
mov    %eax,-0x10(%rbp)
jmp    1137 <bar+0x37>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%eax
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    (%rdi,%rdi,1),%eax
and    $0x10,%eax
ret

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

LLVM IR (-O2):
define i64 @bar(i32 %0) {
%2 = shl i32 %0, 1
%3 = and i32 %2, 16
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int /*<<< orphan*/);
int main() {
  __VERIFIER_assert(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 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
void shiftaddress() {}


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

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

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

LLVM IR (-O2):
define void @shiftaddress() {
ret void
}
void telnet_wont(int option) {}


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

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

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

LLVM IR (-O2):
define void @telnet_wont(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void g_signal_terminate(void (*func)(int)) { signal(SIGTERM, func); }


x86 assembly (clang, -O0):
<g_signal_terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_signal_terminate>:
mov    %rdi,%rsi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
define void @g_signal_terminate(void (i32)* %0) {
%2 = alloca void (i32)*
store void (i32)* %0, void (i32)** %2
%3 = load i32, i32* @SIGTERM
%4 = load void (i32)*, void (i32)** %2
%5 = call i32 @signal(i32 %3, void (i32)* %4)
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
define void @g_signal_terminate(void (i32)* %0) {
%2 = load i32, i32* @SIGTERM
%3 = tail call i32 @signal(i32 %2, void (i32)* %0)
ret void
}
const char *standard_symbol_characters(void) { return "_$."; }


x86 assembly (clang, -O0):
<standard_symbol_characters>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_symbol_characters>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"_$.\00"
define i8* @standard_symbol_characters() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"_$.\00"
define i8* @standard_symbol_characters() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test();
int main() {
  init("sizeof operator");
  test();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ok@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"sizeof operator\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 (...) @ok()
ret i32 %4
}

LLVM IR (-O2):
@.str = [16 x i8] c"sizeof operator\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @ok()
ret i32 %3
}
/* Variables and functions */
unsigned int celix_utils_stringHash(char const *);
unsigned int utils_stringHash(const void *strPtr) {
  return celix_utils_stringHash((const char *)strPtr);
}


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

x86 assembly (clang, -O2):
<utils_stringHash>:
jmp    1030 <celix_utils_stringHash@plt>

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

LLVM IR (-O2):
define i32 @utils_stringHash(i8* %0) {
%2 = tail call i32 @celix_utils_stringHash(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
char *gettext(char *);
int /*<<< orphan*/ print_usage(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void print_error(void) {
  const char *program = "ypcat";
  print_usage(stderr);
  fprintf(stderr,
          gettext("Try `%s --help' or `%s --usage' for more information.\n"),
          program, program);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1050 <print_usage@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xea2(%rip),%rdi
call   1030 <gettext@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edi
call   1050 <print_usage@plt>
mov    (%rbx),%ebx
lea    0xebe(%rip),%rdi
call   1030 <gettext@plt>
lea    0xeac(%rip),%rcx
mov    %ebx,%edi
mov    %rax,%rsi
mov    %rcx,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ypcat\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Try `%s --help' or `%s --usage' for more information.\0A\00"
define void @print_error() {
%1 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i32, i32* @stderr
%3 = call i32 @print_usage(i32 %2)
%4 = load i32, i32* @stderr
%5 = call i8* @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %1
%7 = load i8*, i8** %1
%8 = call i32 @fprintf(i32 %4, i8* %5, i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ypcat\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Try `%s --help' or `%s --usage' for more information.\0A\00"
define void @print_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @print_usage(i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i8* @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @fprintf(i32 %3, i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ printf(char *, int);
void f(int *p, int size) {
  int i = 0;
  for (i = 0; i < size; i++)
    printf("%d\n", p[i]);
  free(p);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116e <f+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <f+0x1d>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r15
test   %esi,%esi
jle    1155 <f+0x35>
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <f+0x20>
mov    %r15,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @f(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %17, %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 i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = load i32*, i32** %3
%22 = call i32 @free(i32* %21)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @f(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
void AL_quick_sort(void *arr, size_t size, size_t count,
                   int (*comp)(void *key1, void *key2)) {
  void *l = arr;
  void *r = arr + size * count;
}


x86 assembly (clang, -O0):
<AL_quick_sort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
imul   -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @AL_quick_sort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
%11 = load i8*, i8** %5
store i8* %11, i8** %9
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = load i64, i64* %7
%15 = mul i64 %13, %14
%16 = getelementptr i8, i8* %12, i64 %15
store i8* %16, i8** %10
ret void
}

LLVM IR (-O2):
define void @AL_quick_sort(i8* nocapture %0, i64 %1, i64 %2, i32 (i8*, i8*)* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ convert_si16_ps(float *, short *, float, int);
void convert_short_float(float *out, short *in, float scale, int len) {
  convert_si16_ps(out, in, scale, len);
}


x86 assembly (clang, -O0):
<convert_short_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
mov    -0x18(%rbp),%edx
call   1030 <convert_si16_ps@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_short_float>:
jmp    1030 <convert_si16_ps@plt>

LLVM IR (-O0):
define void @convert_short_float(float* %0, i16* %1, float %2, i32 %3) {
%5 = alloca float*
%6 = alloca i16*
%7 = alloca float
%8 = alloca i32
store float* %0, float** %5
store i16* %1, i16** %6
store float %2, float* %7
store i32 %3, i32* %8
%9 = load float*, float** %5
%10 = load i16*, i16** %6
%11 = load float, float* %7
%12 = load i32, i32* %8
%13 = call i32 @convert_si16_ps(float* %9, i16* %10, float %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @convert_short_float(float* %0, i16* %1, float %2, i32 %3) {
%5 = tail call i32 @convert_si16_ps(float* %0, i16* %1, float %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void server_connect_cb(int fd) {
  fprintf(stderr, "server::connected to %d\n", fd);
}


x86 assembly (clang, -O0):
<server_connect_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<server_connect_cb>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"server::connected to %d\0A\00"
define void @server_connect_cb(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}