xunge/DecIR huggingface dataset:
unsigned long ADCResolutionGet(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000038))) & 0x00000010);
}


x86 assembly (clang, -O0):
<ADCResolutionGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rax
and    $0x10,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCResolutionGet>:
mov    0x38(%rdi),%rax
and    $0x10,%eax
ret

LLVM IR (-O0):
define i64 @ADCResolutionGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 56
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 16
ret i64 %7
}

LLVM IR (-O2):
define i64 @ADCResolutionGet(i64 %0) {
%2 = add i64 %0, 56
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, 16
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void deldrive(char *filename) {
  char *i, *index();
  if ((i = index(filename, ':')) != (char *)NULL)
    strcpy(filename, i + 1);
}


x86 assembly (clang, -O0):
<deldrive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1040 <index@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1159 <deldrive+0x39>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deldrive>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3a,%esi
call   1040 <index@plt>
test   %rax,%rax
je     1143 <deldrive+0x23>
add    $0x1,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @deldrive(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @index(i8* %4, i32 58)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = call i32 @strcpy(i8* %8, i8* %10)
br label %12
12: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @deldrive(i8* %0) {
%2 = tail call i8* @index(i8* %0, i32 58)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = tail call i32 @strcpy(i8* %0, i8* %5)
br label %7
7: ; preds = %4, %1
ret void
}
/* Variables and functions */
int read_clone_flag(char *);
char *strtok(char *, char *);
int read_clone_flags(char *str) {
  int flags = 0;
  char *s = NULL;
  s = strtok(str, "|");
  while (s) {
    flags |= read_clone_flag(s);
    s = strtok(NULL, "|");
  }
  return flags;
}


x86 assembly (clang, -O0):
<read_clone_flags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1182 <read_clone_flags+0x62>
mov    -0x18(%rbp),%rdi
call   1030 <read_clone_flag@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xe8c(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x18(%rbp)
jmp    114f <read_clone_flags+0x2f>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_clone_flags>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rsi
call   1040 <strtok@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1159 <read_clone_flags+0x39>
lea    0xec2(%rip),%r14
xchg   %ax,%ax
mov    %rax,%rdi
call   1030 <read_clone_flag@plt>
or     %eax,%ebx
xor    %edi,%edi
mov    %r14,%rsi
call   1040 <strtok@plt>
test   %rax,%rax
jne    1140 <read_clone_flags+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"|\00"
define i32 @read_clone_flags(i8* %0) {
%2 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %2, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = tail call i32 @read_clone_flag(i8* %5)
%8 = or i32 %7, %6
%9 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
const char *get_default_conf_file(int defaults_file) {
  return defaults_file ? "/usr/local/etc/tor"
                         "/torrc-defaults"
                       : "/usr/local/etc/tor"
                         "/torrc";
}


x86 assembly (clang, -O0):
<get_default_conf_file>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xf11(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_default_conf_file>:
test   %edi,%edi
lea    0xf19(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [34 x i8] c"/usr/local/etc/tor/torrc-defaults\00"
@.str.1 = [25 x i8] c"/usr/local/etc/tor/torrc\00"
define i8* @get_default_conf_file(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [34 x i8] c"/usr/local/etc/tor/torrc-defaults\00"
@.str.1 = [25 x i8] c"/usr/local/etc/tor/torrc\00"
define i8* @get_default_conf_file(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
unsigned long int system_get_memory_ram() { return 0; }


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

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

LLVM IR (-O0):
define i64 @system_get_memory_ram() {
ret i64 0
}

LLVM IR (-O2):
define i64 @system_get_memory_ram() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, char const *);
void error(const char *msg, int line) {
  char derr[256];
  sprintf(derr, "ERROR [line: %d] %s\n", line, msg);
  perror(derr);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xea9(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
sub    $0x100,%rsp
mov    %esi,%edx
mov    %rdi,%rcx
lea    0xebc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"ERROR [line: %d] %s\0A\00"
define void @error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = load i8*, i8** %3
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 @perror(i8* %10)
%12 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"ERROR [line: %d] %s\0A\00"
define void @error(i8* %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
%6 = call i32 @perror(i8* %4)
%7 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ *__opendirat(int /*<<< orphan*/, char const *);
DIR *__opendir(const char *name) { return __opendirat(AT_FDCWD, name); }


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

x86 assembly (clang, -O2):
<__opendir>:
mov    %rdi,%rsi
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__opendirat@plt>

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

LLVM IR (-O2):
@AT_FDCWD = global i32 0
define i32* @__opendir(i8* %0) {
%2 = load i32, i32* @AT_FDCWD
%3 = tail call i32* @__opendirat(i32 %2, i8* %0)
ret i32* %3
}
/* Variables and functions */
int strlen(char *);
void print_subsection(char *name, unsigned char *edid, int start, int end) {
  int i;
  (void)("%s:", name);
  for (i = strlen(name); i < 15; i++)
    (void)(" ");
  for (i = start; i <= end; i++)
    (void)(" %02x", edid[i]);
  (void)("\n");
}


x86 assembly (clang, -O0):
<print_subsection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xf,-0x1c(%rbp)
jge    114f <print_subsection+0x3f>
jmp    1141 <print_subsection+0x31>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1132 <print_subsection+0x22>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     116f <print_subsection+0x5f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1155 <print_subsection+0x45>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s:\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [6 x i8] c" %02x\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @print_subsection(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %5
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %9
br label %13
13: ; preds = %17, %4
%14 = load i32, i32* %9
%15 = icmp slt i32 %14, 15
br i1 %15, label %16, label %20
16: ; preds = %13
br label %17
17: ; preds = %16
%18 = load i32, i32* %9
%19 = add nsw i32 %18, 1
store i32 %19, i32* %9
br label %13
20: ; preds = %13
%21 = load i32, i32* %7
store i32 %21, i32* %9
br label %22
22: ; preds = %32, %20
%23 = load i32, i32* %9
%24 = load i32, i32* %8
%25 = icmp sle i32 %23, %24
br i1 %25, label %26, label %35
26: ; preds = %22
%27 = load i8*, i8** %6
%28 = load i32, i32* %9
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
br label %32
32: ; preds = %26
%33 = load i32, i32* %9
%34 = add nsw i32 %33, 1
store i32 %34, i32* %9
br label %22
35: ; preds = %22
ret void
}

LLVM IR (-O2):
define void @print_subsection(i8* %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
%5 = tail call i32 @strlen(i8* %0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ PASS(char *);
int /*<<< orphan*/ bar();
int main() {
  bar();
  PASS("rpath-dlopen-indirect");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
lea    0xec3(%rip),%rdi
call   1040 <PASS@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
lea    0xed1(%rip),%rdi
call   1040 <PASS@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"rpath-dlopen-indirect\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @bar()
%3 = call i32 @PASS(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@.str = [22 x i8] c"rpath-dlopen-indirect\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 @PASS(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
void foo337() {}


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

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

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

LLVM IR (-O2):
define void @foo337() {
ret void
}
int *dequeue(a)
int a[];
{
  int *ret;
  ret = &a[a[0]];
  a[a[0]] = 1;
  a[0] += 1;
  return ret;
}


x86 assembly (clang, -O0):
<dequeue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq (%rcx),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq (%rcx),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dequeue>:
movslq (%rdi),%rcx
lea    (%rdi,%rcx,4),%rax
movl   $0x1,(%rdi,%rcx,4)
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define i32* @dequeue(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %4, i64 %8
store i32* %9, i32** %3
%10 = load i32*, i32** %2
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 0
%13 = load i32, i32* %12
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %10, i64 %14
store i32 1, i32* %15
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
store i32 %19, i32* %17
%20 = load i32*, i32** %3
ret i32* %20
}

LLVM IR (-O2):
define i32* @dequeue(i32* %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 1, i32* %4
%5 = load i32, i32* %0
%6 = add nsw i32 %5, 1
store i32 %6, i32* %0
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("please install fftw and try again\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [35 x i8] c"please install fftw and try again\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [34 x i8] c"please install fftw and try again\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ volatile uint16_t;

/* Variables and functions */
uint16_t barRead16(uint32_t bar, uint32_t offset) {
  volatile uint16_t *pReg = (volatile uint16_t *)(bar | (offset & 0xFF));
  return (*pReg);
}


x86 assembly (clang, -O0):
<barRead16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
or     %ecx,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<barRead16>:
movzbl %sil,%eax
or     %edi,%eax
cltq
mov    (%rax),%eax
ret

LLVM IR (-O0):
define i32 @barRead16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = and i32 %7, 255
%9 = or i32 %6, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %5
%12 = load i32*, i32** %5
%13 = load volatile i32, i32* %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @barRead16(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = or i32 %3, %0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
ret i32 %7
}
/* Variables and functions */
scalar_t__ symbolic_start(int);
int symbolic(int c) { return symbolic_start(c) || (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<symbolic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <symbolic_start@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1154 <symbolic+0x44>
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     114e <symbolic+0x3e>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbolic>:
push   %rbx
mov    %edi,%ebx
call   1030 <symbolic_start@plt>
test   %rax,%rax
setne  %al
add    $0xffffffd0,%ebx
cmp    $0xa,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @symbolic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @symbolic_start(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 57
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br label %14
14: ; preds = %12, %1
%15 = phi i1 [ true, %1 ], [ %13, %12 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @symbolic(i32 %0) {
%2 = tail call i64 @symbolic_start(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = add i32 %0, -48
%5 = icmp ult i32 %4, 10
%6 = or i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
void foo170() {}


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

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

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

LLVM IR (-O2):
define void @foo170() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char *);
void findDomain(char url[], char domain[]) {
  char *cpoint;
  strcpy(domain, url + 7);
  printf("domain: %s\n", domain);
  cpoint = strchr(domain, '/');
  domain[cpoint - domain] = '\0';
}


x86 assembly (clang, -O0):
<findDomain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x7,%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findDomain>:
push   %rbx
mov    %rsi,%rbx
lea    0x7(%rdi),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <strchr@plt>
movb   $0x0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"domain: %s\0A\00"
define void @findDomain(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 7
%9 = call i32 @strcpy(i8* %6, i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %4
%13 = call i8* @strchr(i8* %12, i8 signext 47)
store i8* %13, i8** %5
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = load i8*, i8** %4
%17 = ptrtoint i8* %15 to i64
%18 = ptrtoint i8* %16 to i64
%19 = sub i64 %17, %18
%20 = getelementptr inbounds i8, i8* %14, i64 %19
store i8 0, i8* %20
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"domain: %s\0A\00"
define void @findDomain(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 7
%4 = tail call i32 @strcpy(i8* %1, i8* %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i8* @strchr(i8* dereferenceable(1) %1, i8 signext 47)
%7 = ptrtoint i8* %6 to i64
%8 = ptrtoint i8* %1 to i64
%9 = sub i64 %7, %8
%10 = getelementptr inbounds i8, i8* %1, i64 %9
store i8 0, i8* %10
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int pthread_cond_init(pthread_cond_t *__restrict __cond,
                      __const pthread_condattr_t *__restrict __cond_attr) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pthread_cond_init(i32* noalias %0, i32* noalias %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @pthread_cond_init(i32* noalias nocapture readnone %0, i32* noalias nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int strlen(const char *ptr) {
  int i = 0;
  while (*ptr++)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <strlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Fail(char *, int, int);
int printf(char const *, char *);
int strlen(char const *);
void DoStrTest(const char *formatstr, char *param, const char *checkstr) {
  int ret;
  ret = printf(formatstr, param);
  if (ret != strlen(checkstr)) {
    Fail("Expected printf to return %d, got %d.\n", strlen(checkstr), ret);
  }
}


x86 assembly (clang, -O0):
<DoStrTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <printf@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
je     118a <DoStrTest+0x5a>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x1c(%rbp),%edx
lea    0xe7b(%rip),%rdi
call   1050 <Fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoStrTest>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
call   1040 <printf@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %eax,%ebp
jne    1150 <DoStrTest+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <Fail@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Expected printf to return %d, got %d.\0A\00"
define void @DoStrTest(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @printf(i8* %8, i8* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = icmp ne i32 %11, %13
br i1 %14, label %15, label %20
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = call i32 @strlen(i8* %16)
%18 = load i32, i32* %7
%19 = call i32 @Fail(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
br label %20
20: ; preds = %15, %3
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Expected printf to return %d, got %d.\0A\00"
define void @DoStrTest(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* %0, i8* %1)
%5 = tail call i32 @strlen(i8* %2)
%6 = icmp eq i32 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i32 @strlen(i8* %2)
%9 = tail call i32 @Fail(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %4)
br label %10
10: ; preds = %7, %3
ret void
}
int check_if_prime(int c, int i) {
  for (c = 2; c <= i - 1; c++) {
    if (i % c == 0)
      break;
  }
  return c;
}


x86 assembly (clang, -O0):
<check_if_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     114a <check_if_prime+0x4a>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
cmp    $0x0,%edx
jne    1137 <check_if_prime+0x37>
jmp    114a <check_if_prime+0x4a>
jmp    113c <check_if_prime+0x3c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <check_if_prime+0x11>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_if_prime>:
mov    $0x2,%ecx
cmp    $0x3,%esi
jl     1122 <check_if_prime+0x22>
mov    $0x2,%ecx
nop
mov    %esi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1122 <check_if_prime+0x22>
add    $0x1,%ecx
cmp    %ecx,%esi
jne    1110 <check_if_prime+0x10>
mov    %esi,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @check_if_prime(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 2, i32* %3
br label %5
5: ; preds = %17, %2
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = icmp sle i32 %6, %8
br i1 %9, label %10, label %20
10: ; preds = %5
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
br label %20
16: ; preds = %10
br label %17
17: ; preds = %16
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %5
20: ; preds = %15, %5
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @check_if_prime(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 2
br i1 %3, label %4, label %11
4: ; preds = %2, %8
%5 = phi i32 [ %9, %8 ], [ 2, %2 ]
%6 = srem i32 %1, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = add nuw nsw i32 %5, 1
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %8, %4, %2
%12 = phi i32 [ 2, %2 ], [ %5, %4 ], [ %1, %8 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_port(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void io_set_interrupt_defaults(uint8_t port, uint8_t value) {
  set_port(port, value, 0x06, 0x07);
}


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

x86 assembly (clang, -O2):
<io_set_interrupt_defaults>:
mov    $0x6,%edx
mov    $0x7,%ecx
jmp    1030 <set_port@plt>

LLVM IR (-O0):
define void @io_set_interrupt_defaults(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 = call i32 @set_port(i32 %5, i32 %6, i32 6, i32 7)
ret void
}

LLVM IR (-O2):
define void @io_set_interrupt_defaults(i32 %0, i32 %1) {
%3 = tail call i32 @set_port(i32 %0, i32 %1, i32 6, i32 7)
ret void
}
void test(int *arr, int x) {
  int i;
  for (i = 0; i < 10; ++i) {
    int s;
    s = x < 5 ? 1 : 0;
    arr[s] = 0;
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    114c <test+0x4c>
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x5,%edx
cmovl  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <test+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
xor    %eax,%eax
cmp    $0x5,%esi
setl   %al
movl   $0x0,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @test(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp slt i32 %1, 5
%4 = zext i1 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 0, i32* %5
ret void
}
/* Type definitions */
struct RNAplex_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_args(struct RNAplex_args_info *);
int /*<<< orphan*/ clear_given(struct RNAplex_args_info *);
int /*<<< orphan*/ init_args_info(struct RNAplex_args_info *);
void RNAplex_cmdline_parser_init(struct RNAplex_args_info *args_info) {
  clear_given(args_info);
  clear_args(args_info);
  init_args_info(args_info);
}


x86 assembly (clang, -O0):
<RNAplex_cmdline_parser_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clear_given@plt>
mov    -0x8(%rbp),%rdi
call   1030 <clear_args@plt>
mov    -0x8(%rbp),%rdi
call   1050 <init_args_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAplex_cmdline_parser_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_given@plt>
mov    %rbx,%rdi
call   1030 <clear_args@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <init_args_info@plt>

LLVM IR (-O0):
%struct.RNAplex_args_info = type { i32 }
define void @RNAplex_cmdline_parser_init(%struct.RNAplex_args_info* %0) {
%2 = alloca %struct.RNAplex_args_info*
store %struct.RNAplex_args_info* %0, %struct.RNAplex_args_info** %2
%3 = load %struct.RNAplex_args_info*, %struct.RNAplex_args_info** %2
%4 = call i32 @clear_given(%struct.RNAplex_args_info* %3)
%5 = load %struct.RNAplex_args_info*, %struct.RNAplex_args_info** %2
%6 = call i32 @clear_args(%struct.RNAplex_args_info* %5)
%7 = load %struct.RNAplex_args_info*, %struct.RNAplex_args_info** %2
%8 = call i32 @init_args_info(%struct.RNAplex_args_info* %7)
ret void
}

LLVM IR (-O2):
%struct.RNAplex_args_info = type { i32 }
define void @RNAplex_cmdline_parser_init(%struct.RNAplex_args_info* %0) {
%2 = tail call i32 @clear_given(%struct.RNAplex_args_info* %0)
%3 = tail call i32 @clear_args(%struct.RNAplex_args_info* %0)
%4 = tail call i32 @init_args_info(%struct.RNAplex_args_info* %0)
ret void
}
/* Variables and functions */
scalar_t__ cmp(char *, int);
scalar_t__ m_next(int, int *, char ***);
int lookup(int m, int key) {
  char **s;
  int p;
  for (p = -1; m_next(m, &p, &s);) {
    if (cmp(*s, key) == 0)
      return p;
  }
  return -1;
}


x86 assembly (clang, -O0):
<lookup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x1c(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <m_next@plt>
cmp    $0x0,%rax
je     1178 <lookup+0x58>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%esi
call   1030 <cmp@plt>
cmp    $0x0,%rax
jne    1173 <lookup+0x53>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <lookup+0x5f>
jmp    1135 <lookup+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lookup>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
movl   $0xffffffff,0xc(%rsp)
ff
lea    0xc(%rsp),%r14
lea    0x10(%rsp),%r15
mov    %ebp,%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <m_next@plt>
test   %rax,%rax
je     116c <lookup+0x4c>
mov    0x10(%rsp),%rax
mov    (%rax),%rdi
mov    %ebx,%esi
call   1030 <cmp@plt>
test   %rax,%rax
jne    1140 <lookup+0x20>
mov    0xc(%rsp),%eax
jmp    1171 <lookup+0x51>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @lookup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 -1, i32* %7
br label %8
8: ; preds = %20, %2
%9 = load i32, i32* %4
%10 = call i64 @m_next(i32 %9, i32* %7, i8*** %6)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = load i32, i32* %5
%16 = call i64 @cmp(i8* %14, i32 %15)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %12
%19 = load i32, i32* %7
store i32 %19, i32* %3
br label %22
20: ; preds = %12
br label %8
21: ; preds = %8
store i32 -1, i32* %3
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @lookup(i32 %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = bitcast i8*** %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 -1, i32* %4
br label %7
7: ; preds = %10, %2
%8 = call i64 @m_next(i32 %0, i32* %4, i8*** %3)
%9 = icmp eq i64 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %7
%11 = load i8**, i8*** %3
%12 = load i8*, i8** %11
%13 = call i64 @cmp(i8* %12, i32 %1)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %7
15: ; preds = %10
%16 = load i32, i32* %4
br label %17
17: ; preds = %7, %15
%18 = phi i32 [ %16, %15 ], [ -1, %7 ]
ret i32 %18
}
void spx_resource_stats_init(void) {}


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

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

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

LLVM IR (-O2):
define void @spx_resource_stats_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x4a() {
  Assert_real((isupper(74)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              375, ("isupper should be 1 for J"));
}


x86 assembly (clang, -O0):
<t_isupper_0x4a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4a,%edi
call   1030 <isupper@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x177,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x4a>:
push   %rax
mov    $0x4a,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x177,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for J\00"
define void @t_isupper_0x4a() {
%1 = call i32 @isupper(i32 74)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 375, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for J\00"
define void @t_isupper_0x4a() {
%1 = tail call i32 @isupper(i32 74)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 375, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ do_error(char *);
int pthread_cond_signal(int /*<<< orphan*/ *);
int tw_pthread_cond_signal(pthread_cond_t *c) {
  int return_value;
  if ((return_value = pthread_cond_signal(c)) == -1)
    do_error("pthread_cond_signal");
  return (return_value);
}


x86 assembly (clang, -O0):
<tw_pthread_cond_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_cond_signal@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    114d <tw_pthread_cond_signal+0x2d>
lea    0xeb8(%rip),%rdi
call   1040 <do_error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tw_pthread_cond_signal>:
push   %rbx
call   1030 <pthread_cond_signal@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <tw_pthread_cond_signal+0x19>
lea    0xecc(%rip),%rdi
call   1040 <do_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"pthread_cond_signal\00"
define i32 @tw_pthread_cond_signal(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pthread_cond_signal(i32* %4)
store i32 %5, i32* %3
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @do_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [20 x i8] c"pthread_cond_signal\00"
define i32 @tw_pthread_cond_signal(i32* %0) {
%2 = tail call i32 @pthread_cond_signal(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @do_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
void custom_strcpy(char from[], char to[]) {
  while ((*to = *from) != '\0') {
    ++to;
    ++from;
  }
}


x86 assembly (clang, -O0):
<custom_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <custom_strcpy+0x41>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <custom_strcpy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<custom_strcpy>:
mov    (%rdi),%al
mov    %al,(%rsi)
test   %al,%al
je     111f <custom_strcpy+0x1f>
mov    $0x1,%eax
nopl   (%rax)
movzbl (%rdi,%rax,1),%ecx
mov    %cl,(%rsi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <custom_strcpy+0x10>
ret

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

LLVM IR (-O2):
define void @custom_strcpy(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %8, %5 ], [ %1, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
int cpu_type(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cpu_type() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fadd_preg64_qword(int reg64) {
  put8(0xDC);
  put8(reg64);
}


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

x86 assembly (clang, -O2):
<fadd_preg64_qword>:
push   %rbx
mov    %edi,%ebx
mov    $0xdc,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

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

LLVM IR (-O2):
define void @fadd_preg64_qword(i32 %0) {
%2 = tail call i32 @put8(i32 220)
%3 = tail call i32 @put8(i32 %0)
ret void
}
void INT_Excep_CAN0_TXF0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_CAN0_TXF0() {
ret void
}
char *cpApgEmail() { return "lowell@coasttocoastresearch.com"; }


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"lowell@coasttocoastresearch.com\00"
define i8* @cpApgEmail() {
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [32 x i8] c"lowell@coasttocoastresearch.com\00"
define i8* @cpApgEmail() {
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int SOCK_DGRAM;
int SOCK_STREAM;
scalar_t__ strcmp(char const *, char *);
int prototype(const char *proto) {
  if (strcmp(proto, "tcp") == 0)
    return SOCK_STREAM;
  if (strcmp(proto, "udp") == 0)
    return SOCK_DGRAM;
  return -1;
}


x86 assembly (clang, -O0):
<prototype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1147 <prototype+0x37>
mov    0x2e9b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <prototype+0x69>
mov    -0x10(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1172 <prototype+0x62>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1179 <prototype+0x69>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prototype>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1144 <prototype+0x34>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    0x2ead(%rip),%rcx
neg    %rax
sbb    %eax,%eax
or     (%rcx),%eax
pop    %rbx
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"tcp\00"
@SOCK_STREAM = global i32 0
@.str.1 = [4 x i8] c"udp\00"
@SOCK_DGRAM = global i32 0
define i32 @prototype(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = load i32, i32* @SOCK_STREAM
br label %11
6: ; preds = %1
%7 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = load i32, i32* @SOCK_DGRAM
%10 = select i1 %8, i32 %9, i32 -1
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ %5, %4 ], [ %10, %6 ]
ret i32 %12
}
int test_imm_75int64_highword_reg(long long val) {
  return ((val >> 32) & (0x75 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_75int64_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, 117
%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_75int64_highword_reg(i64 %0) {
%2 = and i64 %0, 502511173632
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}