xunge/DecIR huggingface dataset:
void update_state(design, comp, which) struct Design *design;
struct Component *comp;
int which;
{
  void update_overlaps(), update_bounds();
  update_overlaps(design, comp, which);
  update_bounds(design, comp);
}


x86 assembly (clang, -O0):
<update_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <update_overlaps@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <update_bounds@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_state>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <update_overlaps@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <update_bounds@plt>

LLVM IR (-O0):
%struct.Design = type opaque
%struct.Component = type opaque
define void @update_state(%struct.Design* %0, %struct.Component* %1, i32 %2) {
%4 = alloca %struct.Design*
%5 = alloca %struct.Component*
%6 = alloca i32
store %struct.Design* %0, %struct.Design** %4
store %struct.Component* %1, %struct.Component** %5
store i32 %2, i32* %6
%7 = load %struct.Design*, %struct.Design** %4
%8 = load %struct.Component*, %struct.Component** %5
%9 = load i32, i32* %6
%10 = load %struct.Design*, %struct.Design** %4
%11 = load %struct.Component*, %struct.Component** %5
ret void
}

LLVM IR (-O2):
%struct.Design = type opaque
%struct.Component = type opaque
define void @update_state(%struct.Design* %0, %struct.Component* %1, i32 %2) {
tail call void (%struct.Design*, %struct.Component*, i32, ...) bitcast (void (...)* @update_overlaps to void (%struct.Design*, %struct.Component*, i32, ...)*)(%struct.Design* %0, %struct.Component* %1, i32 %2)
tail call void (%struct.Design*, %struct.Component*, ...) bitcast (void (...)* @update_bounds to void (%struct.Design*, %struct.Component*, ...)*)(%struct.Design* %0, %struct.Component* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __getpt(void) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getpt>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getpt>:
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 @__getpt() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getpt() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: uncsv [-Vh] [-d delimiter] [-r repl] [-n repl] "
         "[file ...]\n");
  exit(100);
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"usage: uncsv [-Vh] [-d delimiter] [-r repl] [-n repl] [file ...]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 100)
unreachable
}

LLVM IR (-O2):
@str = [65 x i8] c"usage: uncsv [-Vh] [-d delimiter] [-r repl] [-n repl] [file ...]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 100)
unreachable
}
float foo005(float a, double b, double c) { return (a + b * c); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @foo005(float %0, double %1, double %2) {
%4 = alloca float
%5 = alloca double
%6 = alloca double
store float %0, float* %4
store double %1, double* %5
store double %2, double* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load double, double* %5
%10 = load double, double* %6
%11 = call double @llvm.fmuladd.f64(double %9, double %10, double %8)
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @foo005(float %0, double %1, double %2) {
%4 = fpext float %0 to double
%5 = tail call double @llvm.fmuladd.f64(double %1, double %2, double %4)
%6 = fptrunc double %5 to float
ret float %6
}
long int xb(long int *y) {
  long int xx = *y & 255;
  return xx + y[1];
}


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

x86 assembly (clang, -O2):
<xb>:
movzbl (%rdi),%eax
add    0x8(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @xb(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = load i64, i64* %4
%6 = and i64 %5, 255
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = add nsw i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @xb(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 255
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = add nsw i64 %3, %5
ret i64 %6
}
int number_alnums(int alnum_result, int current_number_alnums) {
  if (alnum_result == 8) {
    current_number_alnums++;
  }
  return current_number_alnums;
}


x86 assembly (clang, -O0):
<number_alnums>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x8,-0x4(%rbp)
jne    111d <number_alnums+0x1d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_alnums>:
xor    %eax,%eax
cmp    $0x8,%edi
sete   %al
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @number_alnums(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 eq i32 %5, 8
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @number_alnums(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 8
%4 = zext i1 %3 to i32
%5 = add nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ explicit_bzero_safe(char *, int);
void erase_char(char *p) { explicit_bzero_safe(p, sizeof(char)); }


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

x86 assembly (clang, -O2):
<erase_char>:
mov    $0x1,%esi
jmp    1030 <explicit_bzero_safe@plt>

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

LLVM IR (-O2):
define void @erase_char(i8* %0) {
%2 = tail call i32 @explicit_bzero_safe(i8* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrerror(char *);
void usage(void) {
  nrerror("usage:\n"
          "RNAalifold [-cv float] [-nc float] [-E] [-old] [-r] [-R ribosum]\n"
          "        [-mis] [-aln] [-color] [-circ] [-s num] [-se num]\n"
          "        [-p[0]] [-C] [-T temp] [-4] [-d] [-noGU] [-noCloseGU]\n"
          "        [-noLP] [-e e_set] [-P paramfile] [-nsp pairs] [-S scale]");
}


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

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

LLVM IR (-O0):
@.str = [258 x i8] c"usage:\0ARNAalifold [-cv float] [-nc float] [-E] [-old] [-r] [-R ribosum]\0A [-mis] [-aln] [-color] [-circ] [-s num] [-se num]\0A [-p[0]] [-C] [-T temp] [-4] [-d] [-noGU] [-noCloseGU]\0A [-noLP] [-e e_set] [-P paramfile] [-nsp pairs] [-S scale]\00"
define void @usage() {
%1 = call i32 @nrerror(i8* getelementptr inbounds ([258 x i8], [258 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [258 x i8] c"usage:\0ARNAalifold [-cv float] [-nc float] [-E] [-old] [-r] [-R ribosum]\0A [-mis] [-aln] [-color] [-circ] [-s num] [-se num]\0A [-p[0]] [-C] [-T temp] [-4] [-d] [-noGU] [-noCloseGU]\0A [-noLP] [-e e_set] [-P paramfile] [-nsp pairs] [-S scale]\00"
define void @usage() {
%1 = tail call i32 @nrerror(i8* getelementptr inbounds ([258 x i8], [258 x i8]* @.str, i64 0, i64 0))
ret void
}
void platform_main_begin(void) {}


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

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

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

LLVM IR (-O2):
define void @platform_main_begin() {
ret void
}
int HelpItem63(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem63() {
ret i32 0
}
int calculate_pad(width)
long width;
{
  int pad = 0;
  pad = ((width % 4) == 0) ? 0 : (4 - (width % 4));
  return (pad);
}


x86 assembly (clang, -O0):
<calculate_pad>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1132 <calculate_pad+0x32>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    114c <calculate_pad+0x4c>
mov    -0x8(%rbp),%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
mov    $0x4,%eax
sub    %rdx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_pad>:
lea    0x3(%rdi),%rax
test   %rdi,%rdi
cmovns %rdi,%rax
and    $0xfffffffffffffffc,%rax
sub    %rax,%rdi
mov    $0x4,%ecx
sub    %edi,%ecx
xor    %eax,%eax
test   %rdi,%rdi
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @calculate_pad(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
%4 = load i64, i64* %2
%5 = srem i64 %4, 4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %12
8: ; preds = %1
%9 = load i64, i64* %2
%10 = srem i64 %9, 4
%11 = sub nsw i64 4, %10
br label %12
12: ; preds = %8, %7
%13 = phi i64 [ 0, %7 ], [ %11, %8 ]
%14 = trunc i64 %13 to i32
store i32 %14, i32* %3
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @calculate_pad(i64 %0) {
%2 = srem i64 %0, 4
%3 = icmp eq i64 %2, 0
%4 = trunc i64 %2 to i32
%5 = sub nsw i32 4, %4
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ tprintf(char *, unsigned long);
int /*<<< orphan*/ tprints(char *);
void decode_seccomp_set_mode_strict(unsigned int flags, unsigned long addr) {
  tprintf("%u, ", flags);
  if (addr)
    tprintf("%#lx", addr);
  else
    tprints("NULL");
}


x86 assembly (clang, -O0):
<decode_seccomp_set_mode_strict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%esi
lea    0xec5(%rip),%rdi
call   1030 <tprintf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1160 <decode_seccomp_set_mode_strict+0x40>
mov    -0x10(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <tprintf@plt>
jmp    116c <decode_seccomp_set_mode_strict+0x4c>
lea    0xea3(%rip),%rdi
call   1040 <tprints@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_seccomp_set_mode_strict>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
call   1030 <tprintf@plt>
test   %rbx,%rbx
je     1147 <decode_seccomp_set_mode_strict+0x27>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <tprintf@plt>
lea    0xebc(%rip),%rdi
pop    %rbx
jmp    1040 <tprints@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%u, \00"
@.str.1 = [5 x i8] c"%#lx\00"
@.str.2 = [5 x i8] c"NULL\00"
define void @decode_seccomp_set_mode_strict(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = call i32 @tprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = load i64, i64* %4
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i64, i64* %4
%12 = call i32 @tprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %11)
br label %15
13: ; preds = %2
%14 = call i32 @tprints(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%u, \00"
@.str.1 = [5 x i8] c"%#lx\00"
@.str.2 = [5 x i8] c"NULL\00"
define void @decode_seccomp_set_mode_strict(i32 %0, i64 %1) {
%3 = zext i32 %0 to i64
%4 = tail call i32 @tprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = icmp eq i64 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @tprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %1)
br label %10
8: ; preds = %2
%9 = tail call i32 @tprints(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foobar();
int /*<<< orphan*/ nothing();
void f() {
  for (;;) {
    nothing();
  }
  foobar();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <f+0x9>
mov    $0x0,%al
call   1030 <nothing@plt>
jmp    1119 <f+0x9>

x86 assembly (clang, -O2):
<f>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nothing@plt>
jmp    1120 <f+0x10>

LLVM IR (-O0):
define void @f() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @nothing()
br label %1
}

LLVM IR (-O2):
define void @f() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @nothing()
br label %1
}
int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.btrfs_fs_info = type opaque
define i32 @btrfs_build_ref_tree(%struct.btrfs_fs_info* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int argNextFilename(int, char **, int /*<<< orphan*/);
int argFilename(int argc, char **argv) {
  int i = argNextFilename(argc, argv, 0);
  return i;
}


x86 assembly (clang, -O0):
<argFilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <argNextFilename@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argFilename>:
xor    %edx,%edx
jmp    1030 <argNextFilename@plt>

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

LLVM IR (-O2):
define i32 @argFilename(i32 %0, i8** %1) {
%3 = tail call i32 @argNextFilename(i32 %0, i8** %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hello from vforked_program...\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Hello from vforked_program...\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"Hello from vforked_program...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int ld_blg_rr1(long double a1, long double a2) {
  return (__builtin_islessgreater(a1, a2));
}


x86 assembly (clang, -O0):
<ld_blg_rr1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blg_rr1>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setne  %al
ret

LLVM IR (-O0):
define i32 @ld_blg_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp one x86_fp80 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ld_blg_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp one x86_fp80 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a = 0;
  int b = 0;
  scanf("%d %d", &a, &b);
  if (((b >> a) & 1) == 1) {
    printf("1");
  } else {
    printf("0");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    1176 <main+0x56>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    1182 <main+0x62>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
bt     %ecx,%eax
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = shl nuw i32 1, %7
%9 = and i32 %8, %6
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 48, i32 49
%12 = call i32 @putchar(i32 %11)
ret i32 0
}
/* Variables and functions */
float acosf(float);
float __racosd(float x) { return (acosf(x) * 57.29577951308232F); }


x86 assembly (clang, -O0):
<__racosd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <acosf@plt>
movss  0xed1(%rip),%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__racosd>:
push   %rax
call   1030 <acosf@plt>
mulss  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @__racosd(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @acosf(float %3)
%5 = fmul float %4, 0x404CA5DC20000000
ret float %5
}

LLVM IR (-O2):
define float @__racosd(float %0) {
%2 = tail call float @acosf(float %0)
%3 = fmul float %2, 0x404CA5DC20000000
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int gen_TERM(void) {
  kill(getpid(), SIGTERM);
  return 0;
}


x86 assembly (clang, -O0):
<gen_TERM>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_TERM>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGTERM = global i32 0
define i32 @gen_TERM() {
%1 = call i32 (...) @getpid()
%2 = load i32, i32* @SIGTERM
%3 = call i32 @kill(i32 %1, i32 %2)
ret i32 0
}

LLVM IR (-O2):
@SIGTERM = global i32 0
define i32 @gen_TERM() {
%1 = tail call i32 (...) @getpid()
%2 = load i32, i32* @SIGTERM
%3 = tail call i32 @kill(i32 %1, i32 %2)
ret i32 0
}
char no_crash_SymbolCast_of_float_type_aux(int *p) {
  *p += 1;
  return *p;
}


x86 assembly (clang, -O0):
<no_crash_SymbolCast_of_float_type_aux>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @no_crash_SymbolCast_of_float_type_aux(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @no_crash_SymbolCast_of_float_type_aux(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
%4 = trunc i32 %3 to i8
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *,
                           char *, int /*<<< orphan*/);
int /*<<< orphan*/ gai_strerror(int);
int /*<<< orphan*/ stderr;
int _host_gaierror(char const *message, int error) {
  fprintf(stderr, "%s%s%s%s\n",
          "host"
          ": ",
          message, ": ", gai_strerror(error));
  return -1;
}


x86 assembly (clang, -O0):
<_host_gaierror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <gai_strerror@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rcx
mov    %eax,%r9d
lea    0xea4(%rip),%rsi
lea    0xea7(%rip),%rdx
lea    0xea4(%rip),%r8
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_host_gaierror>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
mov    %esi,%edi
call   1030 <gai_strerror@plt>
lea    0xec3(%rip),%rsi
lea    0xec6(%rip),%rdx
lea    0xec3(%rip),%r8
mov    %ebp,%edi
mov    %rbx,%rcx
mov    %eax,%r9d
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [10 x i8] c"%s%s%s%s\0A\00"
@.str.1 = [7 x i8] c"host: \00"
@.str.2 = [3 x i8] c": \00"
define i32 @_host_gaierror(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @gai_strerror(i32 %1)
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %4)
ret i32 -1
}
int test_imm_22uint16_mem(unsigned short *val) {
  return ((*val) & (-0x22 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_22uint16_mem>:
movzwl (%rdi),%eax
test   $0xffde,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_22uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -34
%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_22uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -34
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
void *array_creator(size_t, size_t const *, size_t, int /*<<< orphan*/ *,
                    int /*<<< orphan*/);
void *array_create(size_t dim, const size_t *size, size_t v_size) {
  return array_creator(dim, size, v_size, NULL, 0);
}


x86 assembly (clang, -O0):
<array_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <array_creator@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_create>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <array_creator@plt>

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

LLVM IR (-O2):
define i8* @array_create(i64 %0, i64* %1, i64 %2) {
%4 = tail call i8* @array_creator(i64 %0, i64* %1, i64 %2, i32* null, i32 0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ FE_ALL_EXCEPT;
int /*<<< orphan*/ FE_DFL_ENV;
int /*<<< orphan*/ feclearexcept(int /*<<< orphan*/);
int /*<<< orphan*/ fesetenv(int /*<<< orphan*/);
void feenv_tests(void) {
  feclearexcept(FE_ALL_EXCEPT);
  fesetenv(FE_DFL_ENV);
}


x86 assembly (clang, -O0):
<feenv_tests>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <feclearexcept@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1040 <fesetenv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<feenv_tests>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <feclearexcept@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fesetenv@plt>

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
@FE_DFL_ENV = global i32 0
define void @feenv_tests() {
%1 = load i32, i32* @FE_ALL_EXCEPT
%2 = call i32 @feclearexcept(i32 %1)
%3 = load i32, i32* @FE_DFL_ENV
%4 = call i32 @fesetenv(i32 %3)
ret void
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
@FE_DFL_ENV = global i32 0
define void @feenv_tests() {
%1 = load i32, i32* @FE_ALL_EXCEPT
%2 = tail call i32 @feclearexcept(i32 %1)
%3 = load i32, i32* @FE_DFL_ENV
%4 = tail call i32 @fesetenv(i32 %3)
ret void
}
int test_imm_FFint64_lowword_mem(long long *val) {
  return ((*val) & (0xFF << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FFint64_lowword_mem>:
cmpb   $0x0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FFint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 255
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_max(int a, int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<test_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <test_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <test_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @test_max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ uint8_t;
struct log {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print(struct log *, int /*<<< orphan*/, char const *,
                         char const *, int /*<<< orphan*/);
void log_vprintf(struct log *__restrict l, uint8_t level,
                 const char *__restrict tag, const char *__restrict fmt,
                 va_list vargs) {
  print(l, level, tag, fmt, vargs);
}


x86 assembly (clang, -O0):
<log_vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <print@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_vprintf>:
jmp    1030 <print@plt>

LLVM IR (-O0):
%struct.log = type { i32 }
define void @log_vprintf(%struct.log* noalias %0, i32 %1, i8* noalias %2, i8* noalias %3, i32 %4) {
%6 = alloca %struct.log*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store %struct.log* %0, %struct.log** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load %struct.log*, %struct.log** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @print(%struct.log* %11, i32 %12, i8* %13, i8* %14, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.log = type { i32 }
define void @log_vprintf(%struct.log* noalias %0, i32 %1, i8* noalias %2, i8* noalias %3, i32 %4) {
%6 = tail call i32 @print(%struct.log* %0, i32 %1, i8* %2, i8* %3, i32 %4)
ret void
}
void printWinner(int winner) {}


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

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

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

LLVM IR (-O2):
define void @printWinner(i32 %0) {
ret void
}
int has_warning(int x) {
  if (x > 0)
    return x;
}


x86 assembly (clang, -O0):
<has_warning>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1117 <has_warning+0x17>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_warning>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @has_warning(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ set_rounding(int /*<<< orphan*/ const *);
void sub_s(const uint32_t *fcr31, const float *source1, const float *source2,
           float *target) {
  set_rounding(fcr31);
  *target = *source1 - *source2;
}


x86 assembly (clang, -O0):
<sub_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <set_rounding@plt>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_s>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
call   1030 <set_rounding@plt>
movss  (%rbx),%xmm0
subss  (%r15),%xmm0
movss  %xmm0,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @sub_s(i32* %0, float* %1, float* %2, float* %3) {
%5 = alloca i32*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store i32* %0, i32** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load i32*, i32** %5
%10 = call i32 @set_rounding(i32* %9)
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = fsub float %12, %14
%16 = load float*, float** %8
store float %15, float* %16
ret void
}

LLVM IR (-O2):
define void @sub_s(i32* %0, float* nocapture %1, float* nocapture %2, float* nocapture writeonly %3) {
%5 = tail call i32 @set_rounding(i32* %0)
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fsub float %6, %7
store float %8, float* %3
ret void
}
unsigned int peak_transfer_send(struct peak_transfer *x, const char *y,
                                const unsigned int z) {
  (void)x;
  (void)y;
  (void)z;
  return (1);
}


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

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

LLVM IR (-O0):
%struct.peak_transfer = type opaque
define i32 @peak_transfer_send(%struct.peak_transfer* %0, i8* %1, i32 %2) {
%4 = alloca %struct.peak_transfer*
%5 = alloca i8*
%6 = alloca i32
store %struct.peak_transfer* %0, %struct.peak_transfer** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.peak_transfer*, %struct.peak_transfer** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
ret i32 1
}

LLVM IR (-O2):
%struct.peak_transfer = type opaque
define i32 @peak_transfer_send(%struct.peak_transfer* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 1
}
/* Variables and functions */
unsigned short dxl_read_word(unsigned char, int /*<<< orphan*/);
unsigned short getModelNumber(unsigned char id) {
  return dxl_read_word(id, (0));
}


x86 assembly (clang, -O0):
<getModelNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %esi,%esi
movzbl -0x1(%rbp),%edi
call   1030 <dxl_read_word@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @getModelNumber(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call zeroext i16 @dxl_read_word(i8 zeroext %3, i32 0)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @getModelNumber(i8 zeroext %0) {
%2 = tail call zeroext i16 @dxl_read_word(i8 zeroext %0, i32 0)
ret i16 %2
}
/* Type definitions */
typedef unsigned char value;
typedef int /*<<< orphan*/ u_int8_t;

/* Variables and functions */
unsigned char *serialize_u_int8_t(unsigned char *buffer, u_int8_t value) {
  buffer[0] = (value)&0xFF;
  return buffer + 1;
}


x86 assembly (clang, -O0):
<serialize_u_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialize_u_int8_t>:
mov    %sil,(%rdi)
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @serialize_u_int8_t(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 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
ret i8* %11
}

LLVM IR (-O2):
define i8* @serialize_u_int8_t(i8* writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void vfree(char *cp) {
  if (*cp != '\0')
    (void)free(cp);
}


x86 assembly (clang, -O0):
<vfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1135 <vfree+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfree>:
cmpb   $0x0,(%rdi)
je     111a <vfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @vfree(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @vfree(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_atomic();
int /*<<< orphan*/ test_atomic_acquire();
int /*<<< orphan*/ test_atomic_acquire_read();
int /*<<< orphan*/ test_atomic_full();
int /*<<< orphan*/ test_atomic_read();
int /*<<< orphan*/ test_atomic_release();
int /*<<< orphan*/ test_atomic_release_write();
int /*<<< orphan*/ test_atomic_write();
int main() {
  test_atomic();
  test_atomic_acquire();
  test_atomic_release();
  test_atomic_read();
  test_atomic_write();
  test_atomic_full();
  test_atomic_release_write();
  test_atomic_acquire_read();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_atomic@plt>
mov    $0x0,%al
call   1080 <test_atomic_acquire@plt>
mov    $0x0,%al
call   10a0 <test_atomic_release@plt>
mov    $0x0,%al
call   1030 <test_atomic_read@plt>
mov    $0x0,%al
call   1070 <test_atomic_write@plt>
mov    $0x0,%al
call   1040 <test_atomic_full@plt>
mov    $0x0,%al
call   1090 <test_atomic_release_write@plt>
mov    $0x0,%al
call   1060 <test_atomic_acquire_read@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_atomic@plt>
xor    %eax,%eax
call   1080 <test_atomic_acquire@plt>
xor    %eax,%eax
call   10a0 <test_atomic_release@plt>
xor    %eax,%eax
call   1030 <test_atomic_read@plt>
xor    %eax,%eax
call   1070 <test_atomic_write@plt>
xor    %eax,%eax
call   1040 <test_atomic_full@plt>
xor    %eax,%eax
call   1090 <test_atomic_release_write@plt>
xor    %eax,%eax
call   1060 <test_atomic_acquire_read@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_atomic()
%3 = call i32 (...) @test_atomic_acquire()
%4 = call i32 (...) @test_atomic_release()
%5 = call i32 (...) @test_atomic_read()
%6 = call i32 (...) @test_atomic_write()
%7 = call i32 (...) @test_atomic_full()
%8 = call i32 (...) @test_atomic_release_write()
%9 = call i32 (...) @test_atomic_acquire_read()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_atomic()
%2 = tail call i32 (...) @test_atomic_acquire()
%3 = tail call i32 (...) @test_atomic_release()
%4 = tail call i32 (...) @test_atomic_read()
%5 = tail call i32 (...) @test_atomic_write()
%6 = tail call i32 (...) @test_atomic_full()
%7 = tail call i32 (...) @test_atomic_release_write()
%8 = tail call i32 (...) @test_atomic_acquire_read()
ret i32 0
}
int ft_sqrt(int nb) {
  int res;
  int a;
  res = 0;
  a = 1;
  while (a != nb && nb > 0 && a <= 46340) {
    res = a * a;
    if (res == nb) {
      return (a);
    }
    a++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_sqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x11(%rbp)
je     1142 <ft_sqrt+0x42>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jle    1142 <ft_sqrt+0x42>
cmpl   $0xb504,-0x10(%rbp)
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1152 <ft_sqrt+0x52>
jmp    1181 <ft_sqrt+0x81>
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1173 <ft_sqrt+0x73>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1188 <ft_sqrt+0x88>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <ft_sqrt+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sqrt>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     1140 <ft_sqrt+0x40>
mov    $0x2,%ecx
sub    %edi,%ecx
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %edx,%esi
imul   %edx,%esi
cmp    %edi,%esi
je     1141 <ft_sqrt+0x41>
cmp    $0xb503,%edx
ja     1140 <ft_sqrt+0x40>
test   %edi,%edi
jle    1140 <ft_sqrt+0x40>
lea    (%rcx,%rdx,1),%esi
add    $0x1,%edx
cmp    $0x1,%esi
jne    1120 <ft_sqrt+0x20>
ret
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @ft_sqrt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
store i32 1, i32* %5
br label %6
6: ; preds = %27, %1
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %5
%15 = icmp sle i32 %14, 46340
br label %16
16: ; preds = %13, %10, %6
%17 = phi i1 [ false, %10 ], [ false, %6 ], [ %15, %13 ]
br i1 %17, label %18, label %30
18: ; preds = %16
%19 = load i32, i32* %5
%20 = load i32, i32* %5
%21 = mul nsw i32 %19, %20
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = load i32, i32* %3
%24 = icmp eq i32 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %18
%26 = load i32, i32* %5
store i32 %26, i32* %2
br label %31
27: ; preds = %18
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %6
30: ; preds = %16
store i32 0, i32* %2
br label %31
31: ; preds = %30, %25
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @ft_sqrt(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %1, %8
%5 = phi i32 [ %9, %8 ], [ 1, %1 ]
%6 = mul nuw nsw i32 %5, %5
%7 = icmp eq i32 %6, %0
br i1 %7, label %14, label %8
8: ; preds = %4
%9 = add nuw nsw i32 %5, 1
%10 = icmp ne i32 %9, %0
%11 = and i1 %2, %10
%12 = icmp ult i32 %5, 46340
%13 = and i1 %12, %11
br i1 %13, label %4, label %14
14: ; preds = %4, %8, %1
%15 = phi i32 [ 0, %1 ], [ 0, %8 ], [ %5, %4 ]
ret i32 %15
}
unsigned long asm_bswap(unsigned long x) {
  asm("bswap %0" : "=r"(x) : "0"(x));
  return x;
}


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

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

LLVM IR (-O0):
define i64 @asm_bswap(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @asm_bswap(i64 %0) {
%2 = tail call i64 asm "bswap $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Variables and functions */
float M_PI_2;
float sin(float);
float sine_out(float step, float max_steps, float max_val) {
  return max_val * sin((((float)step / max_steps)) * M_PI_2);
}


x86 assembly (clang, -O0):
<sine_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
mov    0x2ea6(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine_out>:
push   %rax
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm0
mov    0x2ec6(%rip),%rax
mulss  (%rax),%xmm0
call   1030 <sin@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI_2 = global float 0.000000e+00
define float @sine_out(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fdiv float %8, %9
%11 = load float, float* @M_PI_2
%12 = fmul float %10, %11
%13 = call float @sin(float %12)
%14 = fmul float %7, %13
ret float %14
}

LLVM IR (-O2):
@M_PI_2 = global float 0.000000e+00
define float @sine_out(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = load float, float* @M_PI_2
%6 = fmul float %4, %5
%7 = tail call float @sin(float %6)
%8 = fmul float %7, %2
ret float %8
}