xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int AT_EXP_XIIC(const unsigned char *RESP) {
  if (RESP == NULL) {
    return (0);
  }
  if (strstr((char *)RESP, "+XIIC:    1") != NULL) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<AT_EXP_XIIC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <AT_EXP_XIIC+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1160 <AT_EXP_XIIC+0x50>
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1159 <AT_EXP_XIIC+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1160 <AT_EXP_XIIC+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AT_EXP_XIIC>:
test   %rdi,%rdi
je     1132 <AT_EXP_XIIC+0x22>
push   %rax
lea    0xee3(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"+XIIC: 1\00"
define i32 @AT_EXP_XIIC(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32* @strstr(i8* %0, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
unsigned long long cpu_stats_get_value_with_pattern(char *, int);
unsigned long long cpu_stats_get_cswch() {
  return cpu_stats_get_value_with_pattern("ctxt ", 1);
}


x86 assembly (clang, -O0):
<cpu_stats_get_cswch>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <cpu_stats_get_value_with_pattern@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_stats_get_cswch>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <cpu_stats_get_value_with_pattern@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"ctxt \00"
define i64 @cpu_stats_get_cswch() {
%1 = tail call i64 @cpu_stats_get_value_with_pattern(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int);
void error_message_exit(int errorCode) {
  printf("There was an error reading in the input. Location: %d", errorCode);
  exit(-1);
}


x86 assembly (clang, -O0):
<error_message_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_message_exit>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"There was an error reading in the input. Location: %d\00"
define void @error_message_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [54 x i8] c"There was an error reading in the input. Location: %d\00"
define void @error_message_exit(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char const *);
int /*<<< orphan*/ init(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  if (argc == 3) {
    init(atoi(argv[1]), atoi(argv[2]));
  } else {
    printf("Please insert a process id and a signal number\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    117c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <init@plt>
jmp    1188 <main+0x58>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x3,%edi
jne    115a <main+0x2a>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <init@plt>
jmp    1166 <main+0x36>
lea    0xe9f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"Please insert a process id and a signal number\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 = load i32, i32* %4
%7 = icmp eq i32 %6, 3
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
%17 = call i32 @init(i32 %12, i32 %16)
br label %20
18: ; preds = %2
%19 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %20
20: ; preds = %18, %8
ret i32 0
}

LLVM IR (-O2):
@str = [47 x i8] c"Please insert a process id and a signal number\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @init(i32 %7, i32 %10)
br label %14
12: ; preds = %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %12, %4
ret i32 0
}
void log_null(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_null(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
__attribute__((no)) int main1() {
  struct {
    char ca[16];
  } s;
  int i;
  for (i = 0; i < 16; i++) {
    s.ca[i] = 5;
  }
  for (i = 0; i < 16; i++) {
    if (s.ca[i] != 5)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1140 <main1+0x30>
movslq -0x14(%rbp),%rax
movb   $0x5,-0x10(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111f <main1+0xf>
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    117d <main1+0x6d>
movslq -0x14(%rbp),%rax
movsbl -0x10(%rbp,%rax,1),%eax
cmp    $0x5,%eax
je     116a <main1+0x5a>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    116f <main1+0x5f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <main1+0x37>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main1() {
ret i32 0
}
delete_and_push_scope(scope_name) char *scope_name;
{
  delete_scope(scope_name);
  zz_push_scope(scope_name);
}


x86 assembly (clang, -O0):
<delete_and_push_scope>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <delete_scope@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <zz_push_scope@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_and_push_scope>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <delete_scope@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <zz_push_scope@plt>

LLVM IR (-O0):
define i32 @delete_and_push_scope(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @delete_scope to i32 (i8*, ...)*)(i8* %4)
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @zz_push_scope to i32 (i8*, ...)*)(i8* %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @delete_and_push_scope(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @delete_scope to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @zz_push_scope to i32 (i8*, ...)*)(i8* %0)
ret i32 undef
}
void g_hook_prepend() {}


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

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

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

LLVM IR (-O2):
define void @g_hook_prepend() {
ret void
}
int head(int *list) {
  if (*list == -1) {
    return (-1);
  } else {
    return *list;
  }
}


x86 assembly (clang, -O0):
<head>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
jne    1121 <head+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    112a <head+0x2a>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<head>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @head(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ FatalError(char *);
int /*<<< orphan*/ printf(char *);
void xiStub(void) {
  printf("xiStub called\n");
  FatalError("xiStub called");
}


x86 assembly (clang, -O0):
<xiStub>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
call   1040 <FatalError@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xiStub>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <FatalError@plt>

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

LLVM IR (-O2):
@str = [14 x i8] c"xiStub called\00"
define void @xiStub() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @FatalError(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ effetre(int /*<<< orphan*/, int);
int /*<<< orphan*/ effezero(int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  int n0 = 5;
  effezero(n0);
  printf("\n");
  effetre(0, n0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <effezero@plt>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
xor    %edi,%edi
call   1040 <effetre@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1050 <effezero@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
mov    $0x5,%esi
call   1040 <effetre@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @effezero(i32 5)
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @effetre(i32 0, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bn_sqr_normal(unsigned long *, unsigned long *, int,
                                 unsigned long *);
void bn_sqr_comba8(unsigned long *r, unsigned long *a) {
  unsigned long t[16];
  bn_sqr_normal(r, a, 8, t);
}


x86 assembly (clang, -O0):
<bn_sqr_comba8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x90(%rbp),%rcx
mov    $0x8,%edx
call   1030 <bn_sqr_normal@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bn_sqr_comba8>:
sub    $0x88,%rsp
mov    %rsp,%rcx
mov    $0x8,%edx
call   1030 <bn_sqr_normal@plt>
add    $0x88,%rsp
ret

LLVM IR (-O0):
define void @bn_sqr_comba8(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [16 x i64]
store i64* %0, i64** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %3
%7 = load i64*, i64** %4
%8 = getelementptr inbounds [16 x i64], [16 x i64]* %5, i64 0, i64 0
%9 = call i32 @bn_sqr_normal(i64* %6, i64* %7, i32 8, i64* %8)
ret void
}

LLVM IR (-O2):
define void @bn_sqr_comba8(i64* %0, i64* %1) {
%3 = alloca [16 x i64]
%4 = bitcast [16 x i64]* %3 to i8*
%5 = getelementptr inbounds [16 x i64], [16 x i64]* %3, i64 0, i64 0
%6 = call i32 @bn_sqr_normal(i64* %0, i64* %1, i32 8, i64* %5)
ret void
}
/* Variables and functions */
int rom_present(char *);
int g2_gc205_available(void) {
  return rom_present(L"roms/video/video7/BIOS.BIN");
}


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

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

LLVM IR (-O0):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 55, i32 47, i32 66, i32 73, i32 79, i32 83, i32 46, i32 66, i32 73, i32 78, i32 0]
define i32 @g2_gc205_available() {
%1 = call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 55, i32 47, i32 66, i32 73, i32 79, i32 83, i32 46, i32 66, i32 73, i32 78, i32 0]
define i32 @g2_gc205_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}
void R_DrawNullModel(void) {}


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

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

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

LLVM IR (-O2):
define void @R_DrawNullModel() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Reserved87_DriverIRQHandler();
__attribute__((weak)) void Reserved87_IRQHandler(void) {
  Reserved87_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @Reserved87_IRQHandler() {
%1 = call i32 (...) @Reserved87_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @Reserved87_IRQHandler() {
%1 = tail call i32 (...) @Reserved87_DriverIRQHandler()
ret void
}
sleep(n) int n;
{
  if (n > 0)
    Delay((long)n * 45);
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1134 <sleep+0x24>
movslq -0x8(%rbp),%rax
imul   $0x2d,%rax,%rdi
mov    $0x0,%al
call   1030 <Delay@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
test   %edi,%edi
jle    112a <sleep+0x1a>
push   %rax
mov    %edi,%eax
lea    (%rax,%rax,8),%rax
lea    (%rax,%rax,4),%rdi
xor    %eax,%eax
call   1030 <Delay@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = mul nsw i64 %8, 45
%10 = call i32 (i64, ...) bitcast (i32 (...)* @Delay to i32 (i64, ...)*)(i64 %9)
br label %11
11: ; preds = %6, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @sleep(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = zext i32 %0 to i64
%5 = mul nuw nsw i64 %4, 45
%6 = tail call i32 (i64, ...) bitcast (i32 (...)* @Delay to i32 (i64, ...)*)(i64 %5)
br label %7
7: ; preds = %3, %1
ret i32 undef
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
struct list *__list_init(struct list *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
struct list *list_init(struct list *head) {
  assert(head != NULL);
  return __list_init(head);
}


x86 assembly (clang, -O0):
<list_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <__list_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_init>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <__list_init@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define %struct.list* @list_init(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = icmp ne %struct.list* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.list*, %struct.list** %2
%8 = call %struct.list* @__list_init(%struct.list* %7)
ret %struct.list* %8
}

LLVM IR (-O2):
%struct.list = type { i32 }
define %struct.list* @list_init(%struct.list* %0) {
%2 = icmp ne %struct.list* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call %struct.list* @__list_init(%struct.list* %0)
ret %struct.list* %5
}
unsigned short cylsec_to_sec(unsigned short cylsec) { return cylsec & 0x3F; }


x86 assembly (clang, -O0):
<cylsec_to_sec>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0x3f,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cylsec_to_sec>:
mov    %edi,%eax
and    $0x3f,%eax
ret

LLVM IR (-O0):
define zeroext i16 @cylsec_to_sec(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 63
%6 = trunc i32 %5 to i16
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @cylsec_to_sec(i16 zeroext %0) {
%2 = and i16 %0, 63
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ SIGCONT;
int /*<<< orphan*/ SIGTSTP;
int /*<<< orphan*/ catchSignal(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  catchSignal(SIGTSTP, 0);
  catchSignal(SIGCONT, 0);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <catchSignal@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <catchSignal@plt>
jmp    113f <main+0x2f>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <catchSignal@plt>
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <catchSignal@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1140 <main+0x30>

LLVM IR (-O0):
@SIGTSTP = global i32 0
@SIGCONT = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGTSTP
%3 = call i32 @catchSignal(i32 %2, i32 0)
%4 = load i32, i32* @SIGCONT
%5 = call i32 @catchSignal(i32 %4, i32 0)
br label %6
6: ; preds = %0, %6
br label %6
}

LLVM IR (-O2):
@SIGTSTP = global i32 0
@SIGCONT = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGTSTP
%2 = tail call i32 @catchSignal(i32 %1, i32 0)
%3 = load i32, i32* @SIGCONT
%4 = tail call i32 @catchSignal(i32 %3, i32 0)
br label %5
5: ; preds = %0, %5
br label %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_4(unsigned long long const,
                                     int /*<<< orphan*/ *);
extern void __put_unaligned_8(const unsigned long long __v,
                              register __u8 *__p) {
  __put_unaligned_4(__v >> 32, __p + 4);
  __put_unaligned_4(__v, __p);
}


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

x86 assembly (clang, -O2):
<__put_unaligned_8>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
shr    $0x20,%rdi
add    $0x10,%rsi
call   1030 <__put_unaligned_4@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__put_unaligned_4@plt>

LLVM IR (-O0):
define void @__put_unaligned_8(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = lshr i64 %5, 32
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 4
%9 = call i32 @__put_unaligned_4(i64 %6, i32* %8)
%10 = load i64, i64* %3
%11 = load i32*, i32** %4
%12 = call i32 @__put_unaligned_4(i64 %10, i32* %11)
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_8(i64 %0, i32* %1) {
%3 = lshr i64 %0, 32
%4 = getelementptr inbounds i32, i32* %1, i64 4
%5 = tail call i32 @__put_unaligned_4(i64 %3, i32* %4)
%6 = tail call i32 @__put_unaligned_4(i64 %0, i32* %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int detail;
};
struct TYPE_4__ {
  TYPE_1__ xfocus;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xfocus_detail(void *_p, int _v) {
  ((XEvent *)_p)->xfocus.detail = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xfocus_detail>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xfocus_detail(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xfocus_detail(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void freemap(double *map) { free(map); }


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

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

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

LLVM IR (-O2):
define void @freemap(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void externalRiskyCodeCompiled() {
  printf("Calling exit from C code that we have compiled\n");
  exit(1);
}


x86 assembly (clang, -O0):
<externalRiskyCodeCompiled>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<externalRiskyCodeCompiled>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Calling exit from C code that we have compiled\0A\00"
define void @externalRiskyCodeCompiled() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [47 x i8] c"Calling exit from C code that we have compiled\00"
define void @externalRiskyCodeCompiled() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
void plt_mesh_free_aux(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @plt_mesh_free_aux(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct fix_tag_classifier {
  int dummy;
};

/* Variables and functions */
const struct fix_tag_classifier *
get_group_classifier_in_TrdgSesGrp(size_t __tag) {
  (void)__tag;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.fix_tag_classifier = type { i32 }
define %struct.fix_tag_classifier* @get_group_classifier_in_TrdgSesGrp(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret %struct.fix_tag_classifier* null
}

LLVM IR (-O2):
%struct.fix_tag_classifier = type { i32 }
define noalias %struct.fix_tag_classifier* @get_group_classifier_in_TrdgSesGrp(i64 %0) {
ret %struct.fix_tag_classifier* null
}
/* Variables and functions */
int /*<<< orphan*/ utest_control();
void utest_adts_eyec(void) {
  utest_control();
  return;
}


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

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

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

LLVM IR (-O2):
define void @utest_adts_eyec() {
%1 = tail call i32 (...) @utest_control()
ret void
}
const char *SttyType() { return "tcsetattr"; }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"tcsetattr\00"
define i8* @SttyType() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int errno;
int recv(int, void *, int, int);
int os_recv(int socket, void *buffer, int length, int flags) {
  int retval;
  retval = recv(socket, buffer, length, flags);
  if (retval == -1)
    retval = -errno;
  return retval;
}


x86 assembly (clang, -O0):
<os_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <recv@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1152 <os_recv+0x42>
xor    %eax,%eax
mov    0x2e93(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_recv>:
push   %rax
call   1030 <recv@plt>
mov    0x2ec3(%rip),%rcx
xor    %edx,%edx
sub    (%rcx),%edx
cmp    $0xffffffff,%eax
cmove  %edx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @os_recv(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 %3)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = select i1 %6, i32 %8, i32 %5
ret i32 %9
}
/* Variables and functions */
double M_PI;
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sprintf(char *, char *, double);
void sprintf_t() {
  char str[80];
  sprintf(str, "Value of Pi = %f", M_PI);
  puts(str);
}


x86 assembly (clang, -O0):
<sprintf_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
lea    0xec2(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdi
call   1030 <puts@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprintf_t>:
push   %rbx
sub    $0x50,%rsp
mov    0x2ebc(%rip),%rax
movsd  (%rax),%xmm0
lea    0xec9(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Value of Pi = %f\00"
@M_PI = global double 0.000000e+00
define void @sprintf_t() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = load double, double* @M_PI
%4 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %3)
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = call i32 @puts(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Value of Pi = %f\00"
@M_PI = global double 0.000000e+00
define void @sprintf_t() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = load double, double* @M_PI
%4 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %3)
%5 = call i32 @puts(i8* %2)
ret void
}
void ARGBCopyAlpha() {}


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

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

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

LLVM IR (-O2):
define void @ARGBCopyAlpha() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ ne_fill(unsigned long);
void ne_fill_test(void **state) {
  assert_int_equal(ne_fill(1ul), 0x8040201008040201ul);
}


x86 assembly (clang, -O0):
<ne_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <ne_fill@plt>
mov    %eax,%edi
mov    $0x8040201,%esi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_fill_test>:
push   %rax
mov    $0x1,%edi
call   1040 <ne_fill@plt>
mov    %eax,%edi
mov    $0x8040201,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @ne_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @ne_fill(i64 1)
%4 = call i32 @assert_int_equal(i32 %3, i32 134480385)
ret void
}

LLVM IR (-O2):
define void @ne_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @ne_fill(i64 1)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 134480385)
ret void
}
void ISC_util_assert() {
  while (1)
    ;
}


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

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

LLVM IR (-O0):
define void @ISC_util_assert() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @ISC_util_assert() {
br label %1
1: ; preds = %0, %1
br label %1
}
cleanup(code) int code;
{
  logcls();
  rmlock((char *)0);
  exit(code);
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <logcls@plt>
xor    %eax,%eax
mov    %eax,%edi
mov    $0x0,%al
call   1040 <rmlock@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<cleanup>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <logcls@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <rmlock@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @cleanup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @logcls()
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @rmlock to i32 (i8*, ...)*)(i8* null)
%5 = load i32, i32* %2
unreachable
}

LLVM IR (-O2):
define i32 @cleanup(i32 %0) {
%2 = tail call i32 (...) @logcls()
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @rmlock to i32 (i8*, ...)*)(i8* null)
tail call void @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_movntps(float *, int /*<<< orphan*/);
void __attribute__((__always___, __nodebug__))
_mm_stream_ps(float *p, __m128 a) {
  __builtin_ia32_movntps(p, a);
}


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

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

LLVM IR (-O0):
define void @_mm_stream_ps(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
%5 = load float*, float** %3
%6 = load i32, i32* %4
%7 = call i32 @__builtin_ia32_movntps(float* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @_mm_stream_ps(float* %0, i32 %1) {
%3 = tail call i32 @__builtin_ia32_movntps(float* %0, i32 %1)
ret void
}
/* Variables and functions */
int ebbrt_newlib_link(char *, char *);
int link(char *old, char *new) { return ebbrt_newlib_link(old, new); }


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

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

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

LLVM IR (-O2):
define i32 @link(i8* %0, i8* %1) {
%3 = tail call i32 @ebbrt_newlib_link(i8* %0, i8* %1)
ret i32 %3
}
double DegreesToRadians(const double degrees) {
  return ((double)(3.14159265358979323846264338327950288419716939937510L *
                   degrees / 180.0));
}


x86 assembly (clang, -O0):
<DegreesToRadians>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
fldl   -0x8(%rbp)
fldt   0xeee(%rip)
fmulp  %st,%st(1)
flds   0xef6(%rip)
fdivrp %st,%st(1)
fstpl  -0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<DegreesToRadians>:
movsd  %xmm0,-0x8(%rsp)
fldt   0xef4(%rip)
fmull  -0x8(%rsp)
fdivs  0xefa(%rip)
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @DegreesToRadians(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fpext double %3 to x86_fp80
%5 = fmul x86_fp80 0xK4000C90FDAA22168C235, %4
%6 = fdiv x86_fp80 %5, 0xK4006B400000000000000
%7 = fptrunc x86_fp80 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @DegreesToRadians(double %0) {
%2 = fpext double %0 to x86_fp80
%3 = fmul x86_fp80 %2, 0xK4000C90FDAA22168C235
%4 = fdiv x86_fp80 %3, 0xK4006B400000000000000
%5 = fptrunc x86_fp80 %4 to double
ret double %5
}
/* Variables and functions */
int strlen(char const *);
char *strrchr(char const *, char);
const char *file_ext(const char *f) {
  const char *c = strrchr(f, '.');
  if (c)
    return c + 1;
  else
    return f + strlen(f);
}


x86 assembly (clang, -O0):
<file_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115a <file_ext+0x3a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    117b <file_ext+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_ext>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     1139 <file_ext+0x19>
add    $0x1,%rax
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @file_ext(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 46)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %2
br label %18
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = load i8*, i8** %3
%15 = call i32 @strlen(i8* %14)
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %13, i64 %16
store i8* %17, i8** %2
br label %18
18: ; preds = %12, %9
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @file_ext(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
br label %10
6: ; preds = %1
%7 = tail call i32 @strlen(i8* %0)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
br label %10
10: ; preds = %6, %4
%11 = phi i8* [ %5, %4 ], [ %9, %6 ]
ret i8* %11
}
int handleTimerInterrupt() {}


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

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

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

LLVM IR (-O2):
define i32 @handleTimerInterrupt() {
ret i32 undef
}
int __attribute__((weak)) get_checked(void) { return -1; }


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

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

LLVM IR (-O0):
define weak i32 @get_checked() {
ret i32 -1
}

LLVM IR (-O2):
define weak i32 @get_checked() {
ret i32 -1
}
int div_and_round_double(lden_orig, hden_orig)
int lden_orig, hden_orig;
{
  int quo[4];
  register int i;
  unsigned int work;
  register unsigned int carry = 0;
  int lden = lden_orig;
  int hden = hden_orig;
  neg_double(&lden, &hden);
  for (i = 4 - 1; i >= 0; i--) {
    quo[i] = work / (unsigned int)lden;
    carry = work % (unsigned int)lden;
  }
  return 0;
}


x86 assembly (clang, -O0):
<div_and_round_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x34(%rbp),%rsi
mov    $0x0,%al
call   1030 <neg_double@plt>
movl   $0x3,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     117c <div_and_round_double+0x6c>
mov    -0x28(%rbp),%eax
xor    %edx,%edx
divl   -0x30(%rbp)
mov    %eax,%ecx
movslq -0x24(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x28(%rbp),%eax
xor    %edx,%edx
divl   -0x30(%rbp)
mov    %edx,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1147 <div_and_round_double+0x37>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_and_round_double>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <neg_double@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @div_and_round_double(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i32]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %8
%11 = load i32, i32* %3
store i32 %11, i32* %9
%12 = load i32, i32* %4
store i32 %12, i32* %10
%13 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @neg_double to i32 (i32*, i32*, ...)*)(i32* %9, i32* %10)
store i32 3, i32* %6
br label %14
14: ; preds = %27, %2
%15 = load i32, i32* %6
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %30
17: ; preds = %14
%18 = load i32, i32* %7
%19 = load i32, i32* %9
%20 = udiv i32 %18, %19
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 %22
store i32 %20, i32* %23
%24 = load i32, i32* %7
%25 = load i32, i32* %9
%26 = urem i32 %24, %25
store i32 %26, i32* %8
br label %27
27: ; preds = %17
%28 = load i32, i32* %6
%29 = add nsw i32 %28, -1
store i32 %29, i32* %6
br label %14
30: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @div_and_round_double(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 %0, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 %1, i32* %4
%7 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @neg_double to i32 (i32*, i32*, ...)*)(i32* %3, i32* %4)
ret i32 0
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ ESPIPE;
int /*<<< orphan*/ errno;
off_t lseek(int fildes, off_t offset, int whence) {
  errno = ESPIPE;
  return -1;
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ed4(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebb(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @lseek(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* @ESPIPE
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ESPIPE
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void pause() {
  struct timespec sleep_time;
  sleep_time.tv_sec = 0;
  sleep_time.tv_nsec = 1 * 1000 * 1000;
  nanosleep(&sleep_time, NULL);
}


x86 assembly (clang, -O0):
<pause>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0xf4240,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0xf4240,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @pause() {
%1 = alloca %struct.timespec
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
store i64 0, i64* %2
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
store i32 1000000, i32* %3
%4 = call i32 @nanosleep(%struct.timespec* %1, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @pause() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 1000000, i32* %4
%5 = call i32 @nanosleep(%struct.timespec* %1, i32* null)
ret void
}