xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int processInfile(char *str) { return open(str, O_RDONLY); }


x86 assembly (clang, -O0):
<processInfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processInfile>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @processInfile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDONLY
%5 = call i32 @open(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @processInfile(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
void *malloc(int);
int /*<<< orphan*/ stderr;
void *xmalloc(int size) {
  void *ptr;
  if ((ptr = malloc(size)) == NULL) {
    fprintf(stderr, "Could not perform malloc of %d bytes\n", size);
    exit(EXIT_FAILURE);
  }
  return (ptr);
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1177 <xmalloc+0x47>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %edi,%ebx
call   1040 <malloc@plt>
test   %rax,%rax
je     113f <xmalloc+0xf>
pop    %rbx
ret
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
mov    %ebx,%edx
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Could not perform malloc of %d bytes\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i32, i32* %2
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Could not perform malloc of %d bytes\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @xmalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ xasprintf(char **, char *, char const *, char, char const *);
char *join(char sep, const char *base, const char *suffix) {
  char *s;
  xasprintf(&s, "%s%c%s", base, sep, suffix);
  return (s);
}


x86 assembly (clang, -O0):
<join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x1(%rbp),%al
mov    -0x18(%rbp),%r8
lea    -0x20(%rbp),%rdi
lea    0xec4(%rip),%rsi
movsbl %al,%ecx
call   1030 <xasprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join>:
push   %rax
mov    %rdx,%r8
mov    %rsi,%rdx
mov    %edi,%ecx
lea    0xee0(%rip),%rsi
mov    %rsp,%rdi
call   1030 <xasprintf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s%c%s\00"
define i8* @join(i8 signext %0, i8* %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8 %0, i8* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = load i8, i8* %4
%10 = load i8*, i8** %6
%11 = call i32 @xasprintf(i8** %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %8, i8 signext %9, i8* %10)
%12 = load i8*, i8** %7
ret i8* %12
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%c%s\00"
define i8* @join(i8 signext %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i32 @xasprintf(i8** %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8 signext %0, i8* %2)
%7 = load i8*, i8** %4
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int);
pid_t __vfork(void) { return syscall(57); }


x86 assembly (clang, -O0):
<__vfork>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39,%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__vfork>:
mov    $0x39,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @__vfork() {
%1 = call i32 @syscall(i32 57)
ret i32 %1
}

LLVM IR (-O2):
define i32 @__vfork() {
%1 = tail call i32 @syscall(i32 57)
ret i32 %1
}
int is_valid_content_type(int content_type) {
  if (content_type & 0x05) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_valid_content_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x5,%eax
cmp    $0x0,%eax
je     1122 <is_valid_content_type+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <is_valid_content_type+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_content_type>:
xor    %eax,%eax
test   $0x5,%dil
setne  %al
ret

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

LLVM IR (-O2):
define i32 @is_valid_content_type(i32 %0) {
%2 = and i32 %0, 5
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void rpi_car_dev_close(int dev) { close(dev); }


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

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

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

LLVM IR (-O2):
define void @rpi_car_dev_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void foo638(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo638(i32 %0) {
ret void
}
int HelpItem16(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem16() {
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char);
char *ui_cmd_skip_ws(char *input) {
  while (input && isspace(*input)) {
    input++;
  }
  return input;
}


x86 assembly (clang, -O0):
<ui_cmd_skip_ws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1142 <ui_cmd_skip_ws+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <ui_cmd_skip_ws+0x42>
jmp    1163 <ui_cmd_skip_ws+0x53>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ui_cmd_skip_ws+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ui_cmd_skip_ws>:
push   %rbx
test   %rdi,%rdi
je     1134 <ui_cmd_skip_ws+0x24>
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   (%rax)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <ui_cmd_skip_ws+0x10>
jmp    1136 <ui_cmd_skip_ws+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ui_cmd_skip_ws(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %8, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isspace(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %10
}
void glGetRenderbufferParameteriv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetRenderbufferParameteriv() {
ret void
}
void *memchr(const void *s, int c, long unsigned int n) {
  const unsigned char uc = c;
  const unsigned char *sp;
  sp = s;
  for (; n != 0; ++sp, --n)
    if (*sp == uc)
      return (void *)sp;
  return 0;
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x21(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     116a <memchr+0x6a>
mov    -0x30(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x21(%rbp),%ecx
cmp    %ecx,%eax
jne    1148 <memchr+0x48>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <memchr+0x72>
jmp    114d <memchr+0x4d>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    111d <memchr+0x1d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
test   %rdx,%rdx
je     111f <memchr+0x1f>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
cmp    %sil,(%rax)
je     1121 <memchr+0x21>
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1110 <memchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %12
%8 = phi i8* [ %0, %5 ], [ %13, %12 ]
%9 = phi i64 [ %2, %5 ], [ %14, %12 ]
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, %6
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = add i64 %9, -1
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %12, %3
%17 = phi i8* [ null, %3 ], [ null, %12 ], [ %8, %7 ]
ret i8* %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() {
  if (1) {
    printf("OK1\n");
  }
  if (0) {
    printf("OK2\n");
  }
  if (1) {
    printf("OK3\n");
  } else {
    printf("OK4\n");
  }
  if (0) {
    printf("OK5\n");
  } else {
    printf("OK6\n");
  }
  printf("OK7\n");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [4 x i8] c"OK1\00"
@str.4 = [4 x i8] c"OK3\00"
@str.5 = [4 x i8] c"OK6\00"
@str.6 = [4 x i8] c"OK7\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Type definitions */
struct sigaction {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int sigaction(int sig, const struct sigaction *restrict act,
              struct sigaction *restrict oact) {
  (void)sig;
  (void)act;
  (void)oact;
  puts("sigaction: not implemented");
  return -1;
}


x86 assembly (clang, -O0):
<sigaction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sigaction = type { i32 }
@.str = [27 x i8] c"sigaction: not implemented\00"
define i32 @sigaction(i32 %0, %struct.sigaction* noalias %1, %struct.sigaction* noalias %2) {
%4 = alloca i32
%5 = alloca %struct.sigaction*
%6 = alloca %struct.sigaction*
store i32 %0, i32* %4
store %struct.sigaction* %1, %struct.sigaction** %5
store %struct.sigaction* %2, %struct.sigaction** %6
%7 = load i32, i32* %4
%8 = load %struct.sigaction*, %struct.sigaction** %5
%9 = load %struct.sigaction*, %struct.sigaction** %6
%10 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.sigaction = type { i32 }
@.str = [27 x i8] c"sigaction: not implemented\00"
define i32 @sigaction(i32 %0, %struct.sigaction* noalias nocapture readnone %1, %struct.sigaction* noalias nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
void RTBldCfgVersionMinor(void) {}


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

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

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

LLVM IR (-O2):
define void @RTBldCfgVersionMinor() {
ret void
}
double _orbita_models_pseudo_isothermal_Mt(const void *par) { return 1. / 0.; }


x86 assembly (clang, -O0):
<_orbita_models_pseudo_isothermal_Mt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_orbita_models_pseudo_isothermal_Mt>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @_orbita_models_pseudo_isothermal_Mt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret double 0x7FF0000000000000
}

LLVM IR (-O2):
define double @_orbita_models_pseudo_isothermal_Mt(i8* nocapture readnone %0) {
ret double 0x7FF0000000000000
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int leernumero() {
  int p_num = 0;
  printf("Introduce un numero: \n");
  scanf("%d", &p_num);
  return p_num;
}


x86 assembly (clang, -O0):
<leernumero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leernumero>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Introduce un numero: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @leernumero() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [22 x i8] c"Introduce un numero: \00"
define i32 @leernumero() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ width;
};
struct TYPE_4__ {
  TYPE_1__ max_logical_extent;
};
typedef TYPE_2__ XFontSetExtents;

/* Variables and functions */
unsigned short get_XFontSetExtents_max_logical_extent_width(void *_p) {
  return (unsigned short)((XFontSetExtents *)_p)->max_logical_extent.width;
}


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

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

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

LLVM IR (-O2):
define zeroext i16 @get_XFontSetExtents_max_logical_extent_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*/ parse_command_line(int, char **);
int main(int argc, char *argv[]) {
  parse_command_line(argc, argv);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @parse_command_line(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_command_line(i32 %0, i8** %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_file;

/* Variables and functions */
int SQLITE_OK;
int nolockUnlock(sqlite3_file *NotUsed, int NotUsed2) {
  (void)(NotUsed), (void)(NotUsed2);
  return SQLITE_OK;
}


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

x86 assembly (clang, -O2):
<nolockUnlock>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@SQLITE_OK = global i32 0
define i32 @nolockUnlock(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @SQLITE_OK
ret i32 %7
}

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @nolockUnlock(i32* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @SQLITE_OK
ret i32 %3
}
void cacheInitForTarget(void) {}


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

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

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

LLVM IR (-O2):
define void @cacheInitForTarget() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bad_if_not_alias(int, int);
void call_bad_if_not_alias_Bad_AlreadyReported() {
  int x, y;
  bad_if_not_alias(x, y);
}


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

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

LLVM IR (-O0):
define void @call_bad_if_not_alias_Bad_AlreadyReported() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @bad_if_not_alias(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @call_bad_if_not_alias_Bad_AlreadyReported() {
%1 = tail call i32 @bad_if_not_alias(i32 undef, i32 undef)
ret void
}
/* Variables and functions */
double TheFunction(double);
double NumericalDifferantiation(double x) {
  return (TheFunction(x + 0.0001) - TheFunction(x)) / 0.0001;
}


x86 assembly (clang, -O0):
<NumericalDifferantiation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <TheFunction@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <TheFunction@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xeae(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumericalDifferantiation>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
addsd  0xede(%rip),%xmm0
call   1030 <TheFunction@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <TheFunction@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0xeb6(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @NumericalDifferantiation(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 1.000000e-04
%5 = call double @TheFunction(double %4)
%6 = load double, double* %2
%7 = call double @TheFunction(double %6)
%8 = fsub double %5, %7
%9 = fdiv double %8, 1.000000e-04
ret double %9
}

LLVM IR (-O2):
define double @NumericalDifferantiation(double %0) {
%2 = fadd double %0, 1.000000e-04
%3 = tail call double @TheFunction(double %2)
%4 = tail call double @TheFunction(double %0)
%5 = fsub double %3, %4
%6 = fdiv double %5, 1.000000e-04
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__2__GeneralIO__set();
void LedsP__Led2__set(void) { Msp430GpioC__2__GeneralIO__set(); }


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

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

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

LLVM IR (-O2):
define void @LedsP__Led2__set() {
%1 = tail call i32 (...) @Msp430GpioC__2__GeneralIO__set()
ret void
}
/* Variables and functions */
double exp(double);
double rand_double();
int rand_poisson(double lamda) {
  double expl = exp(-lamda);
  double sum = 1.0;
  int n = 0;
  do {
    sum *= rand_double();
    ++n;
  } while (sum > expl);
  return n - 1;
}


x86 assembly (clang, -O0):
<rand_poisson>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <rand_double@plt>
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1167 <rand_poisson+0x47>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_poisson>:
push   %rbx
sub    $0x10,%rsp
xorps  0xed4(%rip),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xed1(%rip),%xmm0
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand_double@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%ebx
ucomisd 0x8(%rsp),%xmm0
ja     1150 <rand_poisson+0x30>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rand_poisson(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %2
%6 = load double, double* %2
%7 = fneg double %6
%8 = call double @exp(double %7)
store double %8, double* %3
store double 1.000000e+00, double* %4
store i32 0, i32* %5
br label %9
9: ; preds = %15, %1
%10 = call double (...) @rand_double()
%11 = load double, double* %4
%12 = fmul double %11, %10
store double %12, double* %4
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
br label %15
15: ; preds = %9
%16 = load double, double* %4
%17 = load double, double* %3
%18 = fcmp ogt double %16, %17
br i1 %18, label %9, label %19
19: ; preds = %15
%20 = load i32, i32* %5
%21 = sub nsw i32 %20, 1
ret i32 %21
}

LLVM IR (-O2):
define i32 @rand_poisson(double %0) {
%2 = fneg double %0
%3 = tail call double @exp(double %2)
br label %4
4: ; preds = %4, %1
%5 = phi double [ 1.000000e+00, %1 ], [ %8, %4 ]
%6 = phi i32 [ 0, %1 ], [ %9, %4 ]
%7 = tail call double (...) @rand_double()
%8 = fmul double %5, %7
%9 = add nuw nsw i32 %6, 1
%10 = fcmp ogt double %8, %3
br i1 %10, label %4, label %11
11: ; preds = %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ putchar(char);
int strlen(char *);
void print_member(char *s, int n) {
  int i;
  for (i = 0; i < n - strlen(s); i++) {
    putchar(' ');
  }
  printf("%s"
         "  ",
         s);
}


x86 assembly (clang, -O0):
<print_member>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    -0x14(%rbp),%eax
sub    %edx,%ecx
cmp    %ecx,%eax
jge    1185 <print_member+0x55>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <print_member+0x16>
mov    -0x8(%rbp),%rsi
lea    0xe70(%rip),%rdi
call   1050 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_member>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    %r14d,%eax
jge    116e <print_member+0x3e>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r14d,%ecx
sub    %eax,%ecx
cmp    %ecx,%ebp
jl     1150 <print_member+0x20>
lea    0xe8b(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s \00"
define void @print_member(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, %1
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @putchar(i8 signext 32)
%8 = add nuw nsw i32 %6, 1
%9 = tail call i32 @strlen(i8* %0)
%10 = sub nsw i32 %1, %9
%11 = icmp slt i32 %8, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %2
%13 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void System_sleep_MINUS_seconds(int t) { sleep(t); }


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

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

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

LLVM IR (-O2):
define void @System_sleep_MINUS_seconds(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
int test_imm_62int64_highword_reg(long long val) {
  return ((val >> 32) & (0x62 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_62int64_highword_reg(i64 %0) {
%2 = and i64 %0, 420906795008
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_71uint32_reg(unsigned int val) {
  return ((val) & (0x71 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_71uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x71,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_71uint32_reg>:
test   $0x71,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_71uint32_reg(i32 %0) {
%2 = and i32 %0, 113
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void ERRORs(char *format, char *text, int errornum) {
  fprintf(stderr, "%s\n", text);
  exit(errornum);
}


x86 assembly (clang, -O0):
<ERRORs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ERRORs>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @ERRORs(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* %6
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @ERRORs(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @exit(i32 %2)
unreachable
}
char *test_read_n_minus_2_element() { return 0; }


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

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

LLVM IR (-O0):
define i8* @test_read_n_minus_2_element() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_read_n_minus_2_element() {
ret i8* null
}
/* Type definitions */
struct lg_drv_data {
  int dummy;
};
struct hid_usage {
  int dummy;
};
struct hid_field {
  int dummy;
};
struct hid_device {
  int dummy;
};
typedef int /*<<< orphan*/ __s32;

/* Variables and functions */
int lg4ff_adjust_input_event(struct hid_device *hid, struct hid_field *field,
                             struct hid_usage *usage, __s32 value,
                             struct lg_drv_data *drv_data) {
  return 0;
}


x86 assembly (clang, -O0):
<lg4ff_adjust_input_event>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.hid_device = type { i32 }
%struct.hid_field = type { i32 }
%struct.hid_usage = type { i32 }
%struct.lg_drv_data = type { i32 }
define i32 @lg4ff_adjust_input_event(%struct.hid_device* %0, %struct.hid_field* %1, %struct.hid_usage* %2, i32 %3, %struct.lg_drv_data* %4) {
%6 = alloca %struct.hid_device*
%7 = alloca %struct.hid_field*
%8 = alloca %struct.hid_usage*
%9 = alloca i32
%10 = alloca %struct.lg_drv_data*
store %struct.hid_device* %0, %struct.hid_device** %6
store %struct.hid_field* %1, %struct.hid_field** %7
store %struct.hid_usage* %2, %struct.hid_usage** %8
store i32 %3, i32* %9
store %struct.lg_drv_data* %4, %struct.lg_drv_data** %10
ret i32 0
}

LLVM IR (-O2):
%struct.hid_device = type { i32 }
%struct.hid_field = type { i32 }
%struct.hid_usage = type { i32 }
%struct.lg_drv_data = type { i32 }
define i32 @lg4ff_adjust_input_event(%struct.hid_device* nocapture readnone %0, %struct.hid_field* nocapture readnone %1, %struct.hid_usage* nocapture readnone %2, i32 %3, %struct.lg_drv_data* nocapture readnone %4) {
ret i32 0
}
__attribute__((section(".after_vectors"))) void M0_HardFault_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<M0_HardFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <M0_HardFault_Handler+0x9>
jmp    1109 <M0_HardFault_Handler+0x9>

x86 assembly (clang, -O2):
<M0_HardFault_Handler>:
jmp    1100 <M0_HardFault_Handler>

LLVM IR (-O0):
define void @M0_HardFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @M0_HardFault_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
struct struct_two {
  int dummy;
};
struct struct_one {
  int dummy;
};
typedef struct struct_two struct_of_interest;

/* Variables and functions */
scalar_t__ function_of_interest(int /*<<< orphan*/, int /*<<< orphan*/);
struct struct_one *bad_function(struct struct_one *os, long x) {
  auto const struct struct_two *other_variable;
  auto const struct struct_of_interest *variable_of_interest;
  variable_of_interest =
      (other_variable = 0,
       (const struct struct_of_interest *)function_of_interest(0, 0));
  return (struct struct_one *)variable_of_interest;
}


x86 assembly (clang, -O0):
<bad_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <function_of_interest@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_function>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <function_of_interest@plt>

LLVM IR (-O0):
%struct.struct_one = type { i32 }
%struct.struct_two = type { i32 }
%struct.struct_of_interest = type opaque
define %struct.struct_one* @bad_function(%struct.struct_one* %0, i64 %1) {
%3 = alloca %struct.struct_one*
%4 = alloca i64
%5 = alloca %struct.struct_two*
%6 = alloca %struct.struct_of_interest*
store %struct.struct_one* %0, %struct.struct_one** %3
store i64 %1, i64* %4
store %struct.struct_two* null, %struct.struct_two** %5
%7 = call i64 @function_of_interest(i32 0, i32 0)
%8 = inttoptr i64 %7 to %struct.struct_of_interest*
store %struct.struct_of_interest* %8, %struct.struct_of_interest** %6
%9 = load %struct.struct_of_interest*, %struct.struct_of_interest** %6
%10 = bitcast %struct.struct_of_interest* %9 to %struct.struct_one*
ret %struct.struct_one* %10
}

LLVM IR (-O2):
%struct.struct_one = type { i32 }
%struct.struct_two = type { i32 }
define %struct.struct_one* @bad_function(%struct.struct_one* nocapture readnone %0, i64 %1) {
%3 = tail call i64 @function_of_interest(i32 0, i32 0)
%4 = inttoptr i64 %3 to %struct.struct_one*
ret %struct.struct_one* %4
}
int main() {
  int i;
  int res = 0;
  goto L1;
  do {
  L2:
    res++;
    goto L3;
  L1:
    i = 0;
    goto L2;
  L3:
    i++;
  } while (i < 10);
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    112a <main+0x2a>
jmp    111c <main+0x1c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x36>
movl   $0x0,-0x8(%rbp)
jmp    111c <main+0x1c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jl     1117 <main+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
/* Variables and functions */
int fcntl(int, int, int);
extern int _swift_Platform_fcntl(int fd, int cmd, int value) {
  return fcntl(fd, cmd, value);
}


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

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

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

LLVM IR (-O2):
define i32 @_swift_Platform_fcntl(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @fcntl(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
unsigned long LONG_MAX;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int istrailingjunk(char const *, char *);
int /*<<< orphan*/ stderr;
int ismaxortrailingjunk(const char *arg, char *end, unsigned long ldata) {
  if (ldata == LONG_MAX) {
    fprintf(stderr, "%s: is LONG_MAX\n", arg);
    return -1;
  }
  return istrailingjunk(arg, end);
}


x86 assembly (clang, -O0):
<ismaxortrailingjunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2e99(%rip),%rcx
cmp    (%rcx),%rax
jne    116d <ismaxortrailingjunk+0x4d>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea4(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <ismaxortrailingjunk+0x5d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <istrailingjunk@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ismaxortrailingjunk>:
push   %rax
mov    %rdi,%rax
mov    0x2ead(%rip),%rcx
cmp    %rdx,(%rcx)
jne    114f <ismaxortrailingjunk+0x2f>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edi
lea    0xec0(%rip),%rsi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
mov    %rax,%rdi
pop    %rax
jmp    1030 <istrailingjunk@plt>

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

LLVM IR (-O2):
@LONG_MAX = global i64 0
@stderr = global i32 0
@.str = [17 x i8] c"%s: is LONG_MAX\0A\00"
define i32 @ismaxortrailingjunk(i8* %0, i8* %1, i64 %2) {
%4 = load i64, i64* @LONG_MAX
%5 = icmp eq i64 %4, %2
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %11
9: ; preds = %3
%10 = tail call i32 @istrailingjunk(i8* %0, i8* %1)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ -1, %6 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int __get_array_size(char const *);
size_t strlen(const char *s) {
  int size;
  size = __get_array_size(s);
  return size - 1;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_array_size@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
push   %rax
call   1030 <__get_array_size@plt>
add    $0xffffffff,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @__get_array_size(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = sext i32 %7 to i64
ret i64 %8
}

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = tail call i32 @__get_array_size(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int pegasus_gettimeofday(struct timeval *tv) {
  return (gettimeofday(tv, NULL));
}


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

x86 assembly (clang, -O2):
<pegasus_gettimeofday>:
xor    %esi,%esi
jmp    1030 <gettimeofday@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @pegasus_gettimeofday(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
ret i32 %4
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @pegasus_gettimeofday(%struct.timeval* nocapture %0) {
%2 = tail call i32 @gettimeofday(%struct.timeval* %0, i32* null)
ret i32 %2
}
void ff_hevc_put_hevc_bi_w_qpel_v48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_v48_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usage();
int /*<<< orphan*/ version();
void help() {
  version();
  usage();
}


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

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

LLVM IR (-O0):
define void @help() {
%1 = call i32 (...) @version()
%2 = call i32 (...) @usage()
ret void
}

LLVM IR (-O2):
define void @help() {
%1 = tail call i32 (...) @version()
%2 = tail call i32 (...) @usage()
ret void
}