xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ debugmsg(char *, char *);
int errexit(char s[]) {
  debugmsg("SSL critical error: %s", s);
  return -1;
}


x86 assembly (clang, -O0):
<errexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <debugmsg@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"SSL critical error: %s\00"
define i32 @errexit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @debugmsg(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 -1
}

LLVM IR (-O2):
@.str = [23 x i8] c"SSL critical error: %s\00"
define i32 @errexit(i8* %0) {
%2 = tail call i32 @debugmsg(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 -1
}
void SSMR3PutMem(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3PutMem() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_copy_from_systems_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(100, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_copy_from_systems_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x64,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_copy_from_systems_container>:
mov    $0x64,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_copy_from_systems_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 100, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_copy_from_systems_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 100, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void __attribute((always_)) functionA(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @test1_ShortClassAccessInModule_markUsed__E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sbi_console_putchar(unsigned char);
void cons_putc(int c) { sbi_console_putchar((unsigned char)c); }


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

x86 assembly (clang, -O2):
<cons_putc>:
movzbl %dil,%edi
jmp    1030 <sbi_console_putchar@plt>

LLVM IR (-O0):
define void @cons_putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = call i32 @sbi_console_putchar(i8 zeroext %4)
ret void
}

LLVM IR (-O2):
define void @cons_putc(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @sbi_console_putchar(i8 zeroext %2)
ret void
}
void gtk_progress_bar_get_orientation() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XSetCloseDownMode() {
ret void
}
/* Variables and functions */
int is_legal_hexdigest(char const *);
int is_legal_nickname(char const *);
int is_legal_nickname_or_hexdigest(const char *s) {
  if (*s != '$')
    return is_legal_nickname(s);
  else
    return is_legal_hexdigest(s);
}


x86 assembly (clang, -O0):
<is_legal_nickname_or_hexdigest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
je     114d <is_legal_nickname_or_hexdigest+0x2d>
mov    -0x10(%rbp),%rdi
call   1040 <is_legal_nickname@plt>
mov    %eax,-0x4(%rbp)
jmp    1159 <is_legal_nickname_or_hexdigest+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <is_legal_hexdigest@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_legal_nickname_or_hexdigest>:
cmpb   $0x24,(%rdi)
jne    112a <is_legal_nickname_or_hexdigest+0xa>
jmp    1030 <is_legal_hexdigest@plt>
jmp    1040 <is_legal_nickname@plt>

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

LLVM IR (-O2):
define i32 @is_legal_nickname_or_hexdigest(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 36
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @is_legal_nickname(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @is_legal_hexdigest(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ writes(char *);
void writen() { writes("\n"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @writen() {
%1 = tail call i32 @writes(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
int foo(int i, int j) {
  int x = 1;
  int y = i + x;
  int z = y - i;
  if (z == 1)
    return 1;
  return 2;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    1139 <foo+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <foo+0x40>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char **argv) {
  fprintf(stderr, "usage: %s [-n size] [-h] [-c] [-b]\n", argv[0]);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"usage: %s [-n size] [-h] [-c] [-b]\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ pyi_path_dirname(char *, char const *);
void pyi_path_homepath(char *homepath, const char *thisfile) {
  pyi_path_dirname(homepath, thisfile);
  ;
}


x86 assembly (clang, -O0):
<pyi_path_homepath>:
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 <pyi_path_dirname@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pyi_path_homepath(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 @pyi_path_dirname(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @pyi_path_homepath(i8* %0, i8* %1) {
%3 = tail call i32 @pyi_path_dirname(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Prova(char *);
int /*<<< orphan*/ __fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int main() {
  char s[180];
  gets(s);
  Prova(s);
  printf("%s", s);
  __fpurge(stdin);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
lea    -0xc0(%rbp),%rdi
call   1070 <gets@plt>
lea    -0xc0(%rbp),%rdi
call   1030 <Prova@plt>
lea    -0xc0(%rbp),%rsi
lea    0xe7f(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1040 <__fpurge@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xc0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <gets@plt>
mov    %rbx,%rdi
call   1030 <Prova@plt>
lea    0xe8e(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1040 <__fpurge@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca [180 x i8]
%2 = getelementptr inbounds [180 x i8], [180 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = getelementptr inbounds [180 x i8], [180 x i8]* %1, i64 0, i64 0
%5 = call i32 @Prova(i8* %4)
%6 = getelementptr inbounds [180 x i8], [180 x i8]* %1, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stdin
%9 = call i32 @__fpurge(i32 %8)
%10 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca [180 x i8]
%2 = getelementptr inbounds [180 x i8], [180 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i32 @Prova(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = load i32, i32* @stdin
%7 = call i32 @__fpurge(i32 %6)
%8 = call i32 (...) @getchar()
ret i32 0
}
int baf(short *x) {
  int i;
  short *xx = __builtin_assume_aligned(x, 8);
  for (i = 0; i < 16; i++)
    xx[i] = xx[i] >= 0 ? 0 : 1;
}


x86 assembly (clang, -O0):
<baf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1157 <baf+0x57>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovge %ecx,%eax
mov    %ax,%dx
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <baf+0x17>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<baf>:
movdqu (%rdi),%xmm0
movdqu 0x10(%rdi),%xmm1
psrlw  $0xf,%xmm0
movdqu %xmm0,(%rdi)
psrlw  $0xf,%xmm1
movdqu %xmm1,0x10(%rdi)
ret

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

LLVM IR (-O2):
define i32 @baf(i16* %0) {
%2 = bitcast i16* %0 to i8*
%3 = bitcast i16* %0 to <8 x i16>*
%4 = load <8 x i16>, <8 x i16>* %3
%5 = lshr <8 x i16> %4, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
%6 = bitcast i16* %0 to <8 x i16>*
store <8 x i16> %5, <8 x i16>* %6
%7 = getelementptr inbounds i16, i16* %0, i64 8
%8 = bitcast i16* %7 to <8 x i16>*
%9 = load <8 x i16>, <8 x i16>* %8
%10 = lshr <8 x i16> %9, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
%11 = bitcast i16* %7 to <8 x i16>*
store <8 x i16> %10, <8 x i16>* %11
ret i32 undef
}
void f(int i, int j, int a[20]) {}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f(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
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32 %1, i32* nocapture %2) {
ret void
}
void test_hashtab_itor(void) {}


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

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

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

LLVM IR (-O2):
define void @test_hashtab_itor() {
ret void
}
/* Variables and functions */
double log2(double);
int round(double);
int get_freq_code(double freq) {
  return round(12.0 * log2(freq / 261.63)) + 58;
}


x86 assembly (clang, -O0):
<get_freq_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <log2@plt>
movaps %xmm0,%xmm1
movsd  0xeb2(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <round@plt>
add    $0x3a,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_freq_code>:
push   %rax
divsd  0xed7(%rip),%xmm0
call   1030 <log2@plt>
mulsd  0xed2(%rip),%xmm0
call   1040 <round@plt>
add    $0x3a,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_freq_code(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 2.616300e+02
%5 = call double @log2(double %4)
%6 = fmul double 1.200000e+01, %5
%7 = call i32 @round(double %6)
%8 = add nsw i32 %7, 58
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_freq_code(double %0) {
%2 = fdiv double %0, 2.616300e+02
%3 = tail call double @log2(double %2)
%4 = fmul double %3, 1.200000e+01
%5 = tail call i32 @round(double %4)
%6 = add nsw i32 %5, 58
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int lchown(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int fs_lchown(const char *path, int uid, int gid) {
  return lchown(path, (uid_t)uid, (gid_t)gid);
}


x86 assembly (clang, -O0):
<fs_lchown>:
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
call   1030 <lchown@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fs_lchown(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @lchown(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
struct table {
  int dummy;
};

/* Variables and functions */
struct table *table_create_custom(int, double);
struct table *table_create(int capacity) {
  return table_create_custom(capacity, 0.75);
}


x86 assembly (clang, -O0):
<table_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
movsd  0xeda(%rip),%xmm0
call   1030 <table_create_custom@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_create>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <table_create_custom@plt>

LLVM IR (-O0):
%struct.table = type { i32 }
define %struct.table* @table_create(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call %struct.table* @table_create_custom(i32 %3, double 7.500000e-01)
ret %struct.table* %4
}

LLVM IR (-O2):
%struct.table = type { i32 }
define %struct.table* @table_create(i32 %0) {
%2 = tail call %struct.table* @table_create_custom(i32 %0, double 7.500000e-01)
ret %struct.table* %2
}
/* Variables and functions */
unsigned int iposix_umask(unsigned int);
unsigned int install_umask(unsigned int m) { return iposix_umask(m); }


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

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

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

LLVM IR (-O2):
define i32 @install_umask(i32 %0) {
%2 = tail call i32 @iposix_umask(i32 %0)
ret i32 %2
}
/* Type definitions */
struct tcp {
  int dummy;
};

/* Variables and functions */
struct tcp *tcp_serve_address(int /*<<< orphan*/, int);
struct tcp *tcp_listen(int port) {
  return tcp_serve_address(0, port);
}


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

x86 assembly (clang, -O2):
<tcp_listen>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <tcp_serve_address@plt>

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

LLVM IR (-O2):
%struct.tcp = type { i32 }
define %struct.tcp* @tcp_listen(i32 %0) {
%2 = tail call %struct.tcp* @tcp_serve_address(i32 0, i32 %0)
ret %struct.tcp* %2
}
int mod_of_diff(int a, int b) {
  if (a - b < 0)
    return (b - a);
  else
    return a - b;
}


x86 assembly (clang, -O0):
<mod_of_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jge    1127 <mod_of_diff+0x27>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <mod_of_diff+0x30>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_of_diff>:
sub    %esi,%edi
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @mod_of_diff(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = tail call i32 @llvm.abs.i32(i32 %3, i1 false)
ret i32 %4
}
void moveRight(int *x, int *y) { (*x)++; }


x86 assembly (clang, -O0):
<moveRight>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<moveRight>:
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @moveRight(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* %5
%7 = add nsw i32 %6, 1
store i32 %7, i32* %5
ret void
}

LLVM IR (-O2):
define void @moveRight(i32* nocapture %0, i32* nocapture readnone %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, 1
store i32 %4, i32* %0
ret void
}
int _unlink_r(struct _reent *r, char *name) { return -1; }


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

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_unlink_r(%struct._reent* %0, i8* %1) {
%3 = alloca %struct._reent*
%4 = alloca i8*
store %struct._reent* %0, %struct._reent** %3
store i8* %1, i8** %4
ret i32 -1
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_unlink_r(%struct._reent* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ per_char;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void *get_XFontStruct_per_char(void *_p) {
  return (void *)((XFontStruct *)_p)->per_char;
}


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

x86 assembly (clang, -O2):
<get_XFontStruct_per_char>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @get_XFontStruct_per_char(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ func_master();
int main() {
  func_master();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func_master()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ not_important();
int main() { not_important(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @not_important()
ret i32 0
}
/* Variables and functions */
int open(char *, int);
int /*<<< orphan*/ sys_error(char *, char *, int);
int open_file(char *file, int open_mode) {
  int file_desc;
  if ((file_desc = open(file, open_mode)) < 0)
    sys_error("open failed",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/anthony-kolesov/arc_ltp/refs/heads/"
              "master/testcases/kernel/sched/sched_stress/sched_tc6.c",
              261);
  return (file_desc);
}


x86 assembly (clang, -O0):
<open_file>:
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   1040 <open@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    115f <open_file+0x3f>
lea    0xeb2(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x105,%edx
call   1030 <sys_error@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
push   %rbx
call   1040 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1144 <open_file+0x24>
lea    0xecd(%rip),%rdi
lea    0xed2(%rip),%rsi
mov    $0x105,%edx
call   1030 <sys_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"open failed\00"
@.str.1 = [180 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/anthony-kolesov/arc_ltp/refs/heads/master/testcases/kernel/sched/sched_stress/sched_tc6.c\00"
define i32 @open_file(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @open(i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str.1, i64 0, i64 0), i32 261)
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [12 x i8] c"open failed\00"
@.str.1 = [180 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/anthony-kolesov/arc_ltp/refs/heads/master/testcases/kernel/sched/sched_stress/sched_tc6.c\00"
define i32 @open_file(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @open(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @sys_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str.1, i64 0, i64 0), i32 261)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
void sys_halt(void) { asm volatile("hlt" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @sys_halt() {
tail call void asm sideeffect "hlt", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _clear_error_stack();
int /*<<< orphan*/ _ssl_shutdown();
void ssl_shutdown(void) {
  { _clear_error_stack(); };
  _ssl_shutdown();
}


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

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

LLVM IR (-O0):
define void @ssl_shutdown() {
%1 = call i32 (...) @_clear_error_stack()
%2 = call i32 (...) @_ssl_shutdown()
ret void
}

LLVM IR (-O2):
define void @ssl_shutdown() {
%1 = tail call i32 (...) @_clear_error_stack()
%2 = tail call i32 (...) @_ssl_shutdown()
ret void
}
void einit() {}


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

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

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

LLVM IR (-O2):
define void @einit() {
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  unsigned long long tv_nsec;
};

/* Variables and functions */
unsigned long long diff_time(struct timespec *op1, struct timespec *op2) {
  return (op1->tv_sec - op2->tv_sec) * 1000000000 + op1->tv_nsec - op2->tv_nsec;
}


x86 assembly (clang, -O0):
<diff_time>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
imul   $0x3b9aca00,%eax,%eax
cltq
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%rax
mov    -0x10(%rbp),%rcx
sub    0x8(%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff_time>:
movslq (%rdi),%rax
movslq (%rsi),%rcx
sub    %rcx,%rax
imul   $0x3b9aca00,%rax,%rcx
mov    0x8(%rdi),%rax
sub    0x8(%rsi),%rax
add    %rcx,%rax
ret

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

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i64 @diff_time(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
%8 = mul nsw i32 %7, 1000000000
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%11 = load i64, i64* %10
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%13 = load i64, i64* %12
%14 = sub i64 %11, %13
%15 = add i64 %14, %9
ret i64 %15
}
void SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems = [51 x i8] c"SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems\00"
define void @SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @__func__.SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems, i64 0, i64 0), i8* %0)
ret void
}
int test_27(int a, int b) { return a >= 0 == b >= 0; }


x86 assembly (clang, -O0):
<test_27>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x8(%rbp)
setge  %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_27>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @test_27(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 = icmp sge i32 %5, 0
%7 = zext i1 %6 to i32
%8 = load i32, i32* %4
%9 = icmp sge i32 %8, 0
%10 = zext i1 %9 to i32
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_27(i32 %0, i32 %1) {
%3 = xor i32 %0, %1
%4 = xor i32 %3, -1
%5 = lshr i32 %4, 31
ret i32 %5
}
/* Variables and functions */
int s2qlw();
int s2qlw_() { return s2qlw(); }


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

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

LLVM IR (-O0):
define i32 @s2qlw_() {
%1 = call i32 (...) @s2qlw()
ret i32 %1
}

LLVM IR (-O2):
define i32 @s2qlw_() {
%1 = tail call i32 (...) @s2qlw()
ret i32 %1
}
void updist_(const unsigned int *handle, const unsigned int *value) { return; }


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

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

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

LLVM IR (-O2):
define void @updist_(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *screen;
};
typedef TYPE_1__ XWindowAttributes;
typedef int /*<<< orphan*/ Screen;

/* Variables and functions */
void set_XWindowAttributes_screen(void *_p, void *_v) {
  ((XWindowAttributes *)_p)->screen = (Screen *)_v;
}


x86 assembly (clang, -O0):
<set_XWindowAttributes_screen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XWindowAttributes_screen>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_XWindowAttributes_screen(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*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_XWindowAttributes_screen(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
scalar_t__ get_next_argl(int /*<<< orphan*/ *, char *);
int get_next_argi(va_list *t, char *opt) { return (int)get_next_argl(t, opt); }


x86 assembly (clang, -O0):
<get_next_argi>:
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 <get_next_argl@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_next_argi(i32* %0, i8* %1) {
%3 = tail call i64 @get_next_argl(i32* %0, i8* %1)
%4 = trunc i64 %3 to i32
ret i32 %4
}
char cmple32(float x, float y) { return x <= y; }


x86 assembly (clang, -O0):
<cmple32>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmple32>:
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define signext i8 @cmple32(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ole float %5, %6
%8 = zext i1 %7 to i32
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @cmple32(float %0, float %1) {
%3 = fcmp ole float %0, %1
%4 = zext i1 %3 to i8
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void mumble_userstats_callback(void *user_data) {
  printf("userstats_callback\n");
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"userstats_callback\0A\00"
define void @mumble_userstats_callback(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"userstats_callback\00"
define void @mumble_userstats_callback(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
double OP_Or(double op1, double op2) { return op1 || op2; }


x86 assembly (clang, -O0):
<OP_Or>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jne    1142 <OP_Or+0x42>
jp     1142 <OP_Or+0x42>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP_Or>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
setp   %al
setne  %cl
or     %al,%cl
ucomisd %xmm2,%xmm1
setp   %al
setne  %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @OP_Or(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 = fcmp une double %5, 0.000000e+00
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load double, double* %4
%9 = fcmp une double %8, 0.000000e+00
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @OP_Or(double %0, double %1) {
%3 = fcmp une double %0, 0.000000e+00
%4 = fcmp une double %1, 0.000000e+00
%5 = or i1 %3, %4
%6 = uitofp i1 %5 to double
ret double %6
}
const char *rcsid(const char *p) {
  return rcsid(
      p = "@(#)$File: funcs.c,v 1.44 2008/07/16 18:00:57 christos Exp $");
}


x86 assembly (clang, -O0):
<rcsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <rcsid@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [61 x i8] c"@(#)$File: funcs.c,v 1.44 2008/07/16 18:00:57 christos Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void gtk_accelerator_valid() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accelerator_valid() {
ret void
}
/* Variables and functions */
int Q_rand(int *);
float Q_random(int *seed) { return (Q_rand(seed) & 0xffff) / (float)0x10000; }


x86 assembly (clang, -O0):
<Q_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Q_rand@plt>
and    $0xffff,%eax
cvtsi2ss %eax,%xmm0
movss  0xeca(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_random>:
push   %rax
call   1030 <Q_rand@plt>
movzwl %ax,%eax
cvtsi2ss %eax,%xmm0
mulss  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Q_random(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @Q_rand(i32* %3)
%5 = and i32 %4, 65535
%6 = sitofp i32 %5 to float
%7 = fdiv float %6, 6.553600e+04
ret float %7
}

LLVM IR (-O2):
define float @Q_random(i32* %0) {
%2 = tail call i32 @Q_rand(i32* %0)
%3 = and i32 %2, 65535
%4 = sitofp i32 %3 to float
%5 = fmul float %4, 0x3EF0000000000000
ret float %5
}
unsigned int nlz_long_long(unsigned long long x) {
  if (x == 0)
    return 8 * 8;
  return (unsigned int)__builtin_clzll(x);
}


x86 assembly (clang, -O0):
<nlz_long_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <nlz_long_long+0x1f>
movl   $0x40,-0x4(%rbp)
jmp    112e <nlz_long_long+0x2e>
mov    -0x10(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlz_long_long>:
test   %rdi,%rdi
je     110e <nlz_long_long+0xe>
bsr    %rdi,%rax
xor    $0x3f,%rax
ret
mov    $0x40,%eax
ret

LLVM IR (-O0):
define i32 @nlz_long_long(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 64, i32* %2
br label %11
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i64 @llvm.ctlz.i64(i64 %8, i1 true)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %2
br label %11
11: ; preds = %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @nlz_long_long(i64 %0) {
%2 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 false)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ chmin_test();
int /*<<< orphan*/ imin_test();
int main() {
  chmin_test();
  imin_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @chmin_test()
%2 = tail call i32 (...) @imin_test()
ret i32 0
}