xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strrchr(char *, char);
char *FileName(char *cpPath) {
  char *cpPtr;
  cpPtr = strrchr(cpPath, '/');
  if (cpPtr == NULL)
    cpPtr = cpPath;
  else
    cpPtr++;
  return (cpPtr);
}


x86 assembly (clang, -O0):
<FileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1146 <FileName+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1152 <FileName+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileName>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @FileName(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %2
store i8* %9, i8** %3
br label %13
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %13
13: ; preds = %10, %8
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @FileName(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
int call_back_2(void *target, void *routine_ptr) {
  return (((int (*)(void *))routine_ptr)(target));
}


x86 assembly (clang, -O0):
<call_back_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_back_2>:
jmp    *%rsi

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

LLVM IR (-O2):
define i32 @call_back_2(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32 (i8*)*
%4 = tail call i32 %3(i8* %0)
ret i32 %4
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_token_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_token(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_token_rec(lexbuf, 3);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_token>:
mov    $0x3,%esi
jmp    1030 <Cyc_token_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_token(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_token_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 3)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_token(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_token_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 3)
ret i32 %2
}
void gtk_about_dialog_get_documenters() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_get_documenters() {
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ system(char const *);
int /*<<< orphan*/ usleep(int);
void fork_script(pid_t *pid, const char *script) {
  *pid = fork();
  if (*pid == 0) {
    usleep(100 * 1000);
    system(script);
    usleep(100 * 1000);
    exit(0);
  }
  if (*pid < 0) {
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<fork_script>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1193 <fork_script+0x53>
mov    $0x186a0,%edi
call   1060 <usleep@plt>
mov    -0x10(%rbp),%rdi
call   1030 <system@plt>
mov    $0x186a0,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jge    11ab <fork_script+0x6b>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fork_script>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <fork@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     1163 <fork_script+0x23>
js     1186 <fork_script+0x46>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x186a0,%edi
call   1060 <usleep@plt>
mov    %r14,%rdi
call   1030 <system@plt>
mov    $0x186a0,%edi
call   1060 <usleep@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @fork_script(i64* %0, i8* %1) {
%3 = alloca i64*
%4 = alloca i8*
store i64* %0, i64** %3
store i8* %1, i8** %4
%5 = call i64 (...) @fork()
%6 = load i64*, i64** %3
store i64 %5, i64* %6
%7 = load i64*, i64** %3
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = call i32 @usleep(i32 100000)
%12 = load i8*, i8** %4
%13 = call i32 @system(i8* %12)
%14 = call i32 @usleep(i32 100000)
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %2
%17 = load i64*, i64** %3
%18 = load i64, i64* %17
%19 = icmp slt i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @exit(i32 -1)
unreachable
22: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @fork_script(i64* nocapture writeonly %0, i8* nocapture %1) {
%3 = tail call i64 (...) @fork()
store i64 %3, i64* %0
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @usleep(i32 100000)
%7 = tail call i32 @system(i8* %1)
%8 = tail call i32 @usleep(i32 100000)
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %2
%11 = icmp slt i64 %3, 0
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = tail call i32 @exit(i32 -1)
unreachable
14: ; preds = %10
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int uriUriStringToFilenameW(int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                            int);
int uriUriStringToUnixFilenameW(const wchar_t *uriString, wchar_t *filename) {
  return uriUriStringToFilenameW(uriString, filename, 1);
}


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

x86 assembly (clang, -O2):
<uriUriStringToUnixFilenameW>:
mov    $0x1,%edx
jmp    1030 <uriUriStringToFilenameW@plt>

LLVM IR (-O0):
define i32 @uriUriStringToUnixFilenameW(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 @uriUriStringToFilenameW(i32* %5, i32* %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @uriUriStringToUnixFilenameW(i32* %0, i32* %1) {
%3 = tail call i32 @uriUriStringToFilenameW(i32* %0, i32* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ cstrip(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(void) {
  cstrip(stdin, stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <cstrip@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
call   1030 <cstrip@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdin
%3 = load i32, i32* @stdout
%4 = call i32 @cstrip(i32 %2, i32 %3)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = load i32, i32* @stdout
%3 = tail call i32 @cstrip(i32 %1, i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fpEq(double, double);
void fpTest(double x, double y) {
  double result1 = (35.7 * 100.0) / 45.0;
  double result2 = (x * 100.0) / y;
  fpEq(result1, result2);
}


x86 assembly (clang, -O0):
<fpTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xede(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec9(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <fpEq@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpTest>:
movapd %xmm0,%xmm2
mulsd  0xee4(%rip),%xmm2
divsd  %xmm1,%xmm2
movsd  0xee0(%rip),%xmm0
movapd %xmm2,%xmm1
jmp    1030 <fpEq@plt>

LLVM IR (-O0):
define void @fpTest(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0x4053D55555555556, double* %5
%7 = load double, double* %3
%8 = fmul double %7, 1.000000e+02
%9 = load double, double* %4
%10 = fdiv double %8, %9
store double %10, double* %6
%11 = load double, double* %5
%12 = load double, double* %6
%13 = call i32 @fpEq(double %11, double %12)
ret void
}

LLVM IR (-O2):
define void @fpTest(double %0, double %1) {
%3 = fmul double %0, 1.000000e+02
%4 = fdiv double %3, %1
%5 = tail call i32 @fpEq(double 0x4053D55555555556, double %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ finish();
GS_step1() { finish(); }


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

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

LLVM IR (-O0):
define i32 @GS_step1() {
%1 = alloca i32
%2 = call i32 (...) @finish()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @GS_step1() {
%1 = tail call i32 (...) @finish()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ main2();
int main(void) {
  main2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @main2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *, char const *);
void arg3_handler(int index, const char *arg_name_, const char *arg_val_) {
  printf("arg_handler3 val:[%d %s %s]\n", index, arg_name_, arg_val_);
}


x86 assembly (clang, -O0):
<arg3_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg3_handler>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"arg_handler3 val:[%d %s %s]\0A\00"
define void @arg3_handler(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"arg_handler3 val:[%d %s %s]\0A\00"
define void @arg3_handler(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ function1();
int main() { function1(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @function1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @function1()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void __foo(int x) { printf("Hello, world!  %d\n", x); }


x86 assembly (clang, -O0):
<__foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__foo>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [19 x i8] c"Hello, world! %d\0A\00"
define void @__foo(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ this_comparison_is_false();
void bla3eq(int var) {
  if (var - 10 == INT_MAX - 9)
    this_comparison_is_false();
}


x86 assembly (clang, -O0):
<bla3eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
sub    $0x9,%ecx
cmp    %ecx,%eax
jne    113c <bla3eq+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_false@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla3eq>:
mov    0x2ed1(%rip),%rax
add    $0xffffffff,%edi
cmp    (%rax),%edi
jne    1125 <bla3eq+0x15>
xor    %eax,%eax
jmp    1030 <this_comparison_is_false@plt>
ret

LLVM IR (-O0):
@INT_MAX = global i32 0
define void @bla3eq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 10
%5 = load i32, i32* @INT_MAX
%6 = sub nsw i32 %5, 9
%7 = icmp eq i32 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @this_comparison_is_false()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define void @bla3eq(i32 %0) {
%2 = load i32, i32* @INT_MAX
%3 = add nsw i32 %0, -1
%4 = icmp eq i32 %3, %2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @this_comparison_is_false()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void put8(void *p, uint8_t x) { *(uint8_t *)p = x & 0xff; }


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

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

LLVM IR (-O0):
define void @put8(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 = and i32 %5, 255
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @put8(i8* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
ret void
}
/* Variables and functions */
int pkey_get(int /*<<< orphan*/);
int main(void) { return pkey_get(0); }


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

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <pkey_get@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @pkey_get(i32 0)
ret i32 %1
}
/* Variables and functions */
int from_gps(int);
int ch_q_track(int ch) { return (from_gps((ch << 2) + 0x85)); }


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

x86 assembly (clang, -O2):
<ch_q_track>:
lea    0x85(,%rdi,4),%edi
jmp    1030 <from_gps@plt>

LLVM IR (-O0):
define i32 @ch_q_track(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = add nsw i32 %4, 133
%6 = call i32 @from_gps(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ch_q_track(i32 %0) {
%2 = shl i32 %0, 2
%3 = add nsw i32 %2, 133
%4 = tail call i32 @from_gps(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void handle_interrupt(int sig) {
  puts("Goodbye cruel world....\n");
  exit(1);
}


x86 assembly (clang, -O0):
<handle_interrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [25 x i8] c"Goodbye cruel world....\0A\00"
define void @handle_interrupt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Goodbye cruel world....\0A\00"
define void @handle_interrupt(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ refresh();
void clr(void) {
  clear();
  refresh();
}


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

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

LLVM IR (-O0):
define void @clr() {
%1 = call i32 (...) @clear()
%2 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
define void @clr() {
%1 = tail call i32 (...) @clear()
%2 = tail call i32 (...) @refresh()
ret void
}
/* Type definitions */
struct yaffs_dev {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
void yaffs_load_oh_from_name(struct yaffs_dev *dev, char *oh_name,
                             const char *name) {
  dev = dev;
  { strncpy(oh_name, name, 255 - 1); }
}


x86 assembly (clang, -O0):
<yaffs_load_oh_from_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0xfe,%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_load_oh_from_name>:
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    $0xfe,%edx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
%struct.yaffs_dev = type { i32 }
define void @yaffs_load_oh_from_name(%struct.yaffs_dev* %0, i8* %1, i8* %2) {
%4 = alloca %struct.yaffs_dev*
%5 = alloca i8*
%6 = alloca i8*
store %struct.yaffs_dev* %0, %struct.yaffs_dev** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.yaffs_dev*, %struct.yaffs_dev** %4
store %struct.yaffs_dev* %7, %struct.yaffs_dev** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @strncpy(i8* %8, i8* %9, i32 254)
ret void
}

LLVM IR (-O2):
%struct.yaffs_dev = type { i32 }
define void @yaffs_load_oh_from_name(%struct.yaffs_dev* nocapture readnone %0, i8* %1, i8* %2) {
%4 = tail call i32 @strncpy(i8* %1, i8* %2, i32 254)
ret void
}
unsigned int get_int_off(int i) { return *(unsigned short *)(i * 4); }


x86 assembly (clang, -O0):
<get_int_off>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cltq
movzwl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int_off>:
movslq %edi,%rax
movzwl 0x0(,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @get_int_off(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 4
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i16*
%7 = load i16, i16* %6
%8 = zext i16 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_int_off(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i16*
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
ret i32 %6
}
char contac(register char *s, char c) {
  char n = 0;
  while (*s)
    if (*s++ == c)
      n++;
  return n;
}


x86 assembly (clang, -O0):
<contac>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movb   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <contac+0x4a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    1145 <contac+0x45>
mov    -0xa(%rbp),%al
add    $0x1,%al
mov    %al,-0xa(%rbp)
jmp    1112 <contac+0x12>
movsbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contac>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <contac+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
cmp    %sil,%cl
sete   %cl
add    %cl,%al
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <contac+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define signext i8 @contac(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = icmp eq i8 %6, %1
%11 = zext i1 %10 to i8
%12 = add i8 %7, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8 [ 0, %2 ], [ %12, %5 ]
ret i8 %16
}
void _start(void) {}


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

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

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

LLVM IR (-O2):
define void @_start() {
ret void
}
int test_imm_F8int8_mem(signed char *val) {
  return ((*val) & (-0xF8 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_F8int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff08,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F8int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -248
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
int valid_ipv6_prefix(unsigned prefix) {
  if (prefix > 10 && prefix <= 128)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<valid_ipv6_prefix>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jbe    112a <valid_ipv6_prefix+0x2a>
cmpl   $0x80,-0x8(%rbp)
ja     112a <valid_ipv6_prefix+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <valid_ipv6_prefix+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_ipv6_prefix>:
add    $0xfffffff5,%edi
xor    %eax,%eax
cmp    $0x76,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @valid_ipv6_prefix(i32 %0) {
%2 = add i32 %0, -11
%3 = icmp ult i32 %2, 118
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_rot_13(char *);
int main(int argc, char **argv) {
  if (argc != 2) {
    ft_putchar('\n');
    return (0);
  }
  ft_rot_13(argv[1]);
  ft_putchar('\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)
cmpl   $0x2,-0x8(%rbp)
je     1156 <main+0x36>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    1174 <main+0x54>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <ft_rot_13@plt>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    112f <main+0xf>
mov    0x8(%rsi),%rdi
call   1030 <ft_rot_13@plt>
mov    $0xa,%edi
call   1040 <ft_putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @ft_rot_13(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}
unsigned HashStr(const char *S) {
  unsigned L, H;
  H = L = 0;
  while (*S) {
    H = ((H << 3) ^ ((unsigned char)*S++)) + L++;
  }
  return H;
}


x86 assembly (clang, -O0):
<HashStr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <HashStr+0x52>
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <HashStr+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashStr>:
mov    (%rdi),%r8b
test   %r8b,%r8b
je     1142 <HashStr+0x42>
add    $0x1,%rdi
xor    %esi,%esi
mov    $0xffffffff,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
shl    $0x3,%esi
movzbl %r8b,%eax
xor    %esi,%eax
lea    (%rax,%rdx,1),%esi
add    $0x1,%edx
movzbl (%rdi),%r8d
add    $0x1,%ecx
add    $0x1,%rdi
test   %r8b,%r8b
jne    1120 <HashStr+0x20>
add    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @HashStr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %15, %4 ], [ %2, %1 ]
%6 = phi i32 [ %14, %4 ], [ 0, %1 ]
%7 = phi i32 [ %13, %4 ], [ 0, %1 ]
%8 = phi i8* [ %10, %4 ], [ %0, %1 ]
%9 = shl i32 %6, 3
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = zext i8 %5 to i32
%12 = xor i32 %9, %11
%13 = add i32 %7, 1
%14 = add i32 %12, %7
%15 = load i8, i8* %10
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %1
%18 = phi i32 [ 0, %1 ], [ %14, %4 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ophelp(void) {
  printf("Operator priorities:\n\n    right  association:     '='         "
         "ASSIGNMENT\n    right  association:     '~'         BINARY "
         "NEGATION\n    left   association:     or          BINARY OR\n    "
         "left   association:     and         BINARY AND\n    left   "
         "association:     xor         BINARY XOR\n    left   association:     "
         "'<<' '>>'   BINARY LEFT/RIGHT SHIFT\n    left   association:     '+' "
         "'-'     ADDITION/SUBTRACTION\n    left   association:     '*' '/' "
         "'%%' MULTIPLY/DIVIDE\n    left   association:     '-'         UNARY "
         "MINUS\n    right  association:     '^'         EXPONENTATION\n\n");
}


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

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

LLVM IR (-O0):
@.str = [571 x i8] c"Operator priorities:\0A\0A right association: '=' ASSIGNMENT\0A right association: '~' BINARY NEGATION\0A left association: or BINARY OR\0A left association: and BINARY AND\0A left association: xor BINARY XOR\0A left association: '<<' '>>' BINARY LEFT/RIGHT SHIFT\0A left association: '+' '-' ADDITION/SUBTRACTION\0A left association: '*' '/' '%%' MULTIPLY/DIVIDE\0A left association: '-' UNARY MINUS\0A right association: '^' EXPONENTATION\0A\0A\00"
define void @ophelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([571 x i8], [571 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [571 x i8] c"Operator priorities:\0A\0A right association: '=' ASSIGNMENT\0A right association: '~' BINARY NEGATION\0A left association: or BINARY OR\0A left association: and BINARY AND\0A left association: xor BINARY XOR\0A left association: '<<' '>>' BINARY LEFT/RIGHT SHIFT\0A left association: '+' '-' ADDITION/SUBTRACTION\0A left association: '*' '/' '%%' MULTIPLY/DIVIDE\0A left association: '-' UNARY MINUS\0A right association: '^' EXPONENTATION\0A\0A\00"
define void @ophelp() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([571 x i8], [571 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double pow(double, double);
double power(double left, double right) { return pow(left, right); }


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

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

LLVM IR (-O0):
define double @power(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @pow(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @power(double %0, double %1) {
%3 = tail call double @pow(double %0, double %1)
ret double %3
}
char *cpfn(void) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @cpfn() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ f1a();
int main() { f1a(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f1a()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f1a()
ret i32 0
}
void foo254(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo254(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void after(void) { printf("after!\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"after!\00"
define void @after() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
void quickwakeup_unregister(struct quickwakeup_ops *ops) {}


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

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

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

LLVM IR (-O2):
%struct.quickwakeup_ops = type opaque
define void @quickwakeup_unregister(%struct.quickwakeup_ops* nocapture %0) {
ret void
}
void foo_TestFoobis(void *t) { printf("%s: t=%p\n", __func__, t); }


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

x86 assembly (clang, -O2):
<foo_TestFoobis>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"%s: t=%p\0A\00"
@__func__.foo_TestFoobis = [15 x i8] c"foo_TestFoobis\00"
define void @foo_TestFoobis(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.foo_TestFoobis, i64 0, i64 0), i8* %0)
ret void
}
int do_227() { return 227; }


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

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

LLVM IR (-O0):
define i32 @do_227() {
ret i32 227
}

LLVM IR (-O2):
define i32 @do_227() {
ret i32 227
}
/* Type definitions */
struct request_queue {
  int dummy;
};
struct blk_mq_ctx {
  int dummy;
};

/* Variables and functions */
struct blk_mq_ctx *__blk_mq_get_ctx(struct request_queue *, int /*<<< orphan*/);
int /*<<< orphan*/ get_cpu();
struct blk_mq_ctx *blk_mq_get_ctx(struct request_queue *q) {
  return __blk_mq_get_ctx(q, get_cpu());
}


x86 assembly (clang, -O0):
<blk_mq_get_ctx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <get_cpu@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <__blk_mq_get_ctx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blk_mq_get_ctx>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <get_cpu@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <__blk_mq_get_ctx@plt>

LLVM IR (-O0):
%struct.blk_mq_ctx = type { i32 }
%struct.request_queue = type { i32 }
define %struct.blk_mq_ctx* @blk_mq_get_ctx(%struct.request_queue* %0) {
%2 = alloca %struct.request_queue*
store %struct.request_queue* %0, %struct.request_queue** %2
%3 = load %struct.request_queue*, %struct.request_queue** %2
%4 = call i32 (...) @get_cpu()
%5 = call %struct.blk_mq_ctx* @__blk_mq_get_ctx(%struct.request_queue* %3, i32 %4)
ret %struct.blk_mq_ctx* %5
}

LLVM IR (-O2):
%struct.blk_mq_ctx = type { i32 }
%struct.request_queue = type { i32 }
define %struct.blk_mq_ctx* @blk_mq_get_ctx(%struct.request_queue* %0) {
%2 = tail call i32 (...) @get_cpu()
%3 = tail call %struct.blk_mq_ctx* @__blk_mq_get_ctx(%struct.request_queue* %0, i32 %2)
ret %struct.blk_mq_ctx* %3
}
/* Type definitions */
struct vec3 {
  int dummy;
};
struct mat3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat3_rotation_axis(float *, float *, float);
__attribute__((always_)) struct mat3 *
psmat3_rotation_axis(struct mat3 *result, struct vec3 *a, float angle) {
  mat3_rotation_axis((float *)result, (float *)a, angle);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat3_rotation_axis>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat3_rotation_axis@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat3 = type { i32 }
%struct.vec3 = type { i32 }
define %struct.mat3* @psmat3_rotation_axis(%struct.mat3* %0, %struct.vec3* %1, float %2) {
%4 = alloca %struct.mat3*
%5 = alloca %struct.vec3*
%6 = alloca float
store %struct.mat3* %0, %struct.mat3** %4
store %struct.vec3* %1, %struct.vec3** %5
store float %2, float* %6
%7 = load %struct.mat3*, %struct.mat3** %4
%8 = bitcast %struct.mat3* %7 to float*
%9 = load %struct.vec3*, %struct.vec3** %5
%10 = bitcast %struct.vec3* %9 to float*
%11 = load float, float* %6
%12 = call i32 @mat3_rotation_axis(float* %8, float* %10, float %11)
%13 = load %struct.mat3*, %struct.mat3** %4
ret %struct.mat3* %13
}

LLVM IR (-O2):
%struct.mat3 = type { i32 }
%struct.vec3 = type { i32 }
define %struct.mat3* @psmat3_rotation_axis(%struct.mat3* returned %0, %struct.vec3* %1, float %2) {
%4 = bitcast %struct.mat3* %0 to float*
%5 = bitcast %struct.vec3* %1 to float*
%6 = tail call i32 @mat3_rotation_axis(float* %4, float* %5, float %2)
ret %struct.mat3* %0
}
unsigned char pointer_to_u8() {
  static int buf[10];
  return (int *)buf;
}


x86 assembly (clang, -O0):
<pointer_to_u8>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@pointer_to_u8.buf = internal global [10 x i32] zeroinitializer
define zeroext i8 @pointer_to_u8() {
ret i8 ptrtoint ([10 x i32]* @pointer_to_u8.buf to i8)
}

LLVM IR (-O2):
@pointer_to_u8.buf = internal global [10 x i32] zeroinitializer
define zeroext i8 @pointer_to_u8() {
ret i8 ptrtoint ([10 x i32]* @pointer_to_u8.buf to i8)
}
void Set_ControlBus_to_Initial_Default_State_After_Power_ON(void) {}


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

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

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

LLVM IR (-O2):
define void @Set_ControlBus_to_Initial_Default_State_After_Power_ON() {
ret void
}
double atan(double x) {
  double r;
  __asm__ __volatile__("fld1; fpatan" : "=t"(r) : "0"(x));
  return r;
}


x86 assembly (clang, -O0):
<atan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
fldl   -0x18(%rbp)
fld1
fpatan
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan>:
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
fld1
fpatan
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @atan(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double asm sideeffect "fld1; fpatan", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %4)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @atan(double %0) {
%2 = tail call double asm sideeffect "fld1; fpatan", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
ret double %2
}
void test5() { asm("nop" : : "X"(8)); }


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

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

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

LLVM IR (-O2):
define void @test5() {
tail call void asm sideeffect "nop", "X,~{dirflag},~{fpsr},~{flags}"(i32 8)
ret void
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t __getdirentries(int fd, char *buf, size_t nbytes, off_t *basep) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getdirentries>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getdirentries>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getdirentries(i32 %0, i8* %1, i64 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @__set_errno(i32 %9)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getdirentries(i32 %0, i8* nocapture readnone %1, i64 %2, i32* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
void calc_load_exit_idle(void) {}


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

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

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

LLVM IR (-O2):
define void @calc_load_exit_idle() {
ret void
}
/* Variables and functions */
int proceed_timer_safe(int *, int const, int const, int /*<<< orphan*/);
int proceed_timer(int *timer, const int warn, const int exceed) {
  return proceed_timer_safe(timer, warn, exceed, 0);
}


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

x86 assembly (clang, -O2):
<proceed_timer>:
xor    %ecx,%ecx
jmp    1030 <proceed_timer_safe@plt>

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

LLVM IR (-O2):
define i32 @proceed_timer(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @proceed_timer_safe(i32* %0, i32 %1, i32 %2, i32 0)
ret i32 %4
}
void ctk_dialog_close() {}


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

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

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

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