xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fork();
int main(void) {
  fork();
  fork();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = tail call i32 (...) @fork()
ret i32 0
}
void io_delay() { asm volatile("jmp 1f; 1: jmp 1f; 1:"); }


x86 assembly (clang, -O0):
<io_delay>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <io_delay+0x9>
jmp    110e <io_delay+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_delay>:
jmp    1102 <io_delay+0x2>
jmp    1104 <io_delay+0x4>
ret

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

LLVM IR (-O2):
define void @io_delay() {
tail call void asm sideeffect "jmp 1f; 1: jmp 1f; 1:", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int freecell_solver_stack_compare_for_comparison(void const *, void const *);
int fcs_stack_compare_for_comparison_with_context(const void *v_s1,
                                                  const void *v_s2,
                                                  void *context) {
  (void)context;
  return freecell_solver_stack_compare_for_comparison(v_s1, v_s2);
}


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

x86 assembly (clang, -O2):
<fcs_stack_compare_for_comparison_with_context>:
jmp    1030 <freecell_solver_stack_compare_for_comparison@plt>

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

LLVM IR (-O2):
define i32 @fcs_stack_compare_for_comparison_with_context(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @freecell_solver_stack_compare_for_comparison(i8* %0, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ o_ld(int);
int /*<<< orphan*/ o_s(char *);
int /*<<< orphan*/ printv(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void faildd(char *str, int d, int d2) {
  printv("ERR: %% failed with: %%,%%\n", o_s(str), o_ld(d), o_ld(d2));
  exit(1);
}


x86 assembly (clang, -O0):
<faildd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <o_s@plt>
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <o_ld@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1050 <o_ld@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    %eax,%ecx
lea    0xe80(%rip),%rdi
call   1030 <printv@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<faildd>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
call   1040 <o_s@plt>
mov    %eax,%r14d
mov    %ebp,%edi
call   1050 <o_ld@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <o_ld@plt>
lea    0xe99(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1030 <printv@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"ERR: %% failed with: %%,%%\0A\00"
define void @faildd(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 = call i32 @o_s(i8* %7)
%9 = load i32, i32* %5
%10 = call i32 @o_ld(i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @o_ld(i32 %11)
%13 = call i32 @printv(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10, i32 %12)
%14 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [28 x i8] c"ERR: %% failed with: %%,%%\0A\00"
define void @faildd(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @o_s(i8* %0)
%5 = tail call i32 @o_ld(i32 %1)
%6 = tail call i32 @o_ld(i32 %2)
%7 = tail call i32 @printv(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ slice_from_s(struct SN_env *, int /*<<< orphan*/,
                                int /*<<< orphan*/);
extern void slice_del(struct SN_env *z) { slice_from_s(z, 0, 0); }


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

x86 assembly (clang, -O2):
<slice_del>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <slice_from_s@plt>

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

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @slice_del(%struct.SN_env* %0) {
%2 = tail call i32 @slice_from_s(%struct.SN_env* %0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int libfun();
int main() { return libfun(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @libfun()
ret i32 %1
}
int digitval(int ch) {
  unsigned d;
  d = (unsigned)(ch - '0');
  if (d < 10)
    return (int)d;
  d = (unsigned)(ch - 'a');
  if (d < 6)
    return (int)(d + 10);
  d = (unsigned)(ch - 'A');
  if (d < 6)
    return (int)(d + 10);
  return -1;
}


x86 assembly (clang, -O0):
<digitval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jae    1125 <digitval+0x25>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <digitval+0x6e>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jae    1146 <digitval+0x46>
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    116e <digitval+0x6e>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jae    1167 <digitval+0x67>
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    116e <digitval+0x6e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digitval>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <digitval+0x27>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <digitval+0x16>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x41(%rdi),%eax
add    $0xffffffc9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @digitval(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = sub nsw i32 %5, 48
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ult i32 %7, 10
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %28
11: ; preds = %1
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 97
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = icmp ult i32 %14, 6
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = load i32, i32* %4
%18 = add i32 %17, 10
store i32 %18, i32* %2
br label %28
19: ; preds = %11
%20 = load i32, i32* %3
%21 = sub nsw i32 %20, 65
store i32 %21, i32* %4
%22 = load i32, i32* %4
%23 = icmp ult i32 %22, 6
br i1 %23, label %24, label %27
24: ; preds = %19
%25 = load i32, i32* %4
%26 = add i32 %25, 10
store i32 %26, i32* %2
br label %28
27: ; preds = %19
store i32 -1, i32* %2
br label %28
28: ; preds = %27, %24, %16, %9
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @digitval(i32 %0) {
%2 = add nsw i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -97
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %14
9: ; preds = %4
%10 = add nsw i32 %0, -65
%11 = icmp ult i32 %10, 6
%12 = add i32 %0, -55
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %9, %1, %7
%15 = phi i32 [ %8, %7 ], [ %2, %1 ], [ %13, %9 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ glmAnd3s(int *, int *, int);
void glmAnd3s_(bool x[3], bool y) { glmAnd3s(x, x, y); }


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

x86 assembly (clang, -O2):
<glmAnd3s_>:
mov    %esi,%edx
mov    %rdi,%rsi
jmp    1030 <glmAnd3s@plt>

LLVM IR (-O0):
define void @glmAnd3s_(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** %3
%7 = load i32, i32* %4
%8 = call i32 @glmAnd3s(i32* %5, i32* %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @glmAnd3s_(i32* %0, i32 %1) {
%3 = tail call i32 @glmAnd3s(i32* %0, i32* %0, i32 %1)
ret void
}
/* Type definitions */
struct ptrlist_struct {
  int dummy;
};
struct elasticarray {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ elasticarray_free(struct elasticarray *);
void ptrlist_free(struct ptrlist_struct *EA) {
  elasticarray_free((struct elasticarray *)EA);
}


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

x86 assembly (clang, -O2):
<ptrlist_free>:
jmp    1030 <elasticarray_free@plt>

LLVM IR (-O0):
%struct.ptrlist_struct = type { i32 }
%struct.elasticarray = type { i32 }
define void @ptrlist_free(%struct.ptrlist_struct* %0) {
%2 = alloca %struct.ptrlist_struct*
store %struct.ptrlist_struct* %0, %struct.ptrlist_struct** %2
%3 = load %struct.ptrlist_struct*, %struct.ptrlist_struct** %2
%4 = bitcast %struct.ptrlist_struct* %3 to %struct.elasticarray*
%5 = call i32 @elasticarray_free(%struct.elasticarray* %4)
ret void
}

LLVM IR (-O2):
%struct.ptrlist_struct = type { i32 }
%struct.elasticarray = type { i32 }
define void @ptrlist_free(%struct.ptrlist_struct* %0) {
%2 = bitcast %struct.ptrlist_struct* %0 to %struct.elasticarray*
%3 = tail call i32 @elasticarray_free(%struct.elasticarray* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World");
  printf("How are you?");
  printf("Have a nice day");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [13 x i8] c"How are you?\00"
@.str.2 = [16 x i8] c"Have a nice day\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [13 x i8] c"How are you?\00"
@.str.2 = [16 x i8] c"Have a nice day\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ n;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printbitssimple(int n) {
  unsigned int i;
  i = 1 << (sizeof(n) * 8 - 1);
  while (i > 0) {
    if (n & i)
      printf("1");
    else
      printf("0");
    i >>= 1;
  }
}


x86 assembly (clang, -O0):
<printbitssimple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1166 <printbitssimple+0x56>
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     114c <printbitssimple+0x3c>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <printbitssimple+0x48>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printbitssimple+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printbitssimple>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x80000000,%ebx
mov    $0x80000000,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%eax
and    %r14d,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
shr    %ebp
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1130 <printbitssimple+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
define void @printbitssimple(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i32, i32* %3
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = and i32 %8, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %16
14: ; preds = %7
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = load i32, i32* %3
%18 = lshr i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @printbitssimple(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ -2147483648, %1 ], [ %8, %2 ]
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 48, i32 49
%7 = tail call i32 @putchar(i32 %6)
%8 = lshr i32 %3, 1
%9 = icmp ult i32 %3, 2
br i1 %9, label %10, label %2
10: ; preds = %2
ret void
}
/* Variables and functions */
double max(double, double);
double min(double, double);
double median3(double a, double b, double c) {
  double x, y;
  x = min(min(a, b), c);
  y = max(max(a, b), c);
  return a + b + c - x - y;
}


x86 assembly (clang, -O0):
<median3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <min@plt>
movsd  -0x18(%rbp),%xmm1
call   1030 <min@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <max@plt>
movsd  -0x18(%rbp),%xmm1
call   1040 <max@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<median3>:
sub    $0x28,%rsp
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x18(%rsp)
call   1030 <min@plt>
movsd  0x8(%rsp),%xmm1
call   1030 <min@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1040 <max@plt>
movsd  0x8(%rsp),%xmm1
call   1040 <max@plt>
movsd  0x18(%rsp),%xmm1
addsd  0x10(%rsp),%xmm1
addsd  0x8(%rsp),%xmm1
subsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @median3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = load double, double* %5
%11 = call double @min(double %9, double %10)
%12 = load double, double* %6
%13 = call double @min(double %11, double %12)
store double %13, double* %7
%14 = load double, double* %4
%15 = load double, double* %5
%16 = call double @max(double %14, double %15)
%17 = load double, double* %6
%18 = call double @max(double %16, double %17)
store double %18, double* %8
%19 = load double, double* %4
%20 = load double, double* %5
%21 = fadd double %19, %20
%22 = load double, double* %6
%23 = fadd double %21, %22
%24 = load double, double* %7
%25 = fsub double %23, %24
%26 = load double, double* %8
%27 = fsub double %25, %26
ret double %27
}

LLVM IR (-O2):
define double @median3(double %0, double %1, double %2) {
%4 = tail call double @min(double %0, double %1)
%5 = tail call double @min(double %4, double %2)
%6 = tail call double @max(double %0, double %1)
%7 = tail call double @max(double %6, double %2)
%8 = fadd double %0, %1
%9 = fadd double %8, %2
%10 = fsub double %9, %5
%11 = fsub double %10, %7
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ nrf_cel();
void nrf_nolisten() { nrf_cel(); }


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

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

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

LLVM IR (-O2):
define void @nrf_nolisten() {
%1 = tail call i32 (...) @nrf_cel()
ret void
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
int xatoll_sfx(char const *, struct suffix_mult const *);
__attribute__((always_)) int xatoi_sfx(const char *str,
                                       const struct suffix_mult *sfx) {
  return xatoll_sfx(str, sfx);
}


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

x86 assembly (clang, -O2):
<xatoi_sfx>:
jmp    1030 <xatoll_sfx@plt>

LLVM IR (-O0):
%struct.suffix_mult = type { i32 }
define i32 @xatoi_sfx(i8* %0, %struct.suffix_mult* %1) {
%3 = alloca i8*
%4 = alloca %struct.suffix_mult*
store i8* %0, i8** %3
store %struct.suffix_mult* %1, %struct.suffix_mult** %4
%5 = load i8*, i8** %3
%6 = load %struct.suffix_mult*, %struct.suffix_mult** %4
%7 = call i32 @xatoll_sfx(i8* %5, %struct.suffix_mult* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i32 @xatoi_sfx(i8* %0, %struct.suffix_mult* %1) {
%3 = tail call i32 @xatoll_sfx(i8* %0, %struct.suffix_mult* %1)
ret i32 %3
}
/* Variables and functions */
long hv_generic(int, unsigned long, unsigned long, unsigned long, unsigned long,
                unsigned long);
long h_register_logical_lan(unsigned long unit_address, unsigned long buf_list,
                            unsigned long rec_q, unsigned long filter_list,
                            unsigned long mac_address) {
  return hv_generic(0x114, unit_address, buf_list, rec_q, filter_list,
                    mac_address);
}


x86 assembly (clang, -O0):
<h_register_logical_lan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    $0x114,%edi
call   1030 <hv_generic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_register_logical_lan>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x114,%edi
jmp    1030 <hv_generic@plt>

LLVM IR (-O0):
define i64 @h_register_logical_lan(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = load i64, i64* %9
%15 = load i64, i64* %10
%16 = call i64 @hv_generic(i32 276, i64 %11, i64 %12, i64 %13, i64 %14, i64 %15)
ret i64 %16
}

LLVM IR (-O2):
define i64 @h_register_logical_lan(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i64 @hv_generic(i32 276, i64 %0, i64 %1, i64 %2, i64 %3, i64 %4)
ret i64 %6
}
int ti_vidya_start(double const *options) { return ((int)(options[1])) - 2; }


x86 assembly (clang, -O0):
<ti_vidya_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si 0x8(%rax),%eax
sub    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_vidya_start>:
cvttsd2si 0x8(%rdi),%eax
add    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @ti_vidya_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 1
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_vidya_start(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = load double, double* %2
%4 = fptosi double %3 to i32
%5 = add nsw i32 %4, -2
ret i32 %5
}
/* Type definitions */
struct pmd_part {
  int dummy;
};
struct fmdriver_work {
  int dummy;
};
struct driver_pmd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pmd_part_cmdload(struct driver_pmd *, struct pmd_part *);
int /*<<< orphan*/ pmd_part_set_pan(struct fmdriver_work *, struct driver_pmd *,
                                    struct pmd_part *, int /*<<< orphan*/);
void pmd_cmdec_pan(struct fmdriver_work *work, struct driver_pmd *pmd,
                   struct pmd_part *part) {
  pmd_part_set_pan(work, pmd, part, pmd_part_cmdload(pmd, part));
}


x86 assembly (clang, -O0):
<pmd_cmdec_pan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <pmd_part_cmdload@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1030 <pmd_part_set_pan@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmd_cmdec_pan>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <pmd_part_cmdload@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <pmd_part_set_pan@plt>

LLVM IR (-O0):
%struct.fmdriver_work = type { i32 }
%struct.driver_pmd = type { i32 }
%struct.pmd_part = type { i32 }
define void @pmd_cmdec_pan(%struct.fmdriver_work* %0, %struct.driver_pmd* %1, %struct.pmd_part* %2) {
%4 = alloca %struct.fmdriver_work*
%5 = alloca %struct.driver_pmd*
%6 = alloca %struct.pmd_part*
store %struct.fmdriver_work* %0, %struct.fmdriver_work** %4
store %struct.driver_pmd* %1, %struct.driver_pmd** %5
store %struct.pmd_part* %2, %struct.pmd_part** %6
%7 = load %struct.fmdriver_work*, %struct.fmdriver_work** %4
%8 = load %struct.driver_pmd*, %struct.driver_pmd** %5
%9 = load %struct.pmd_part*, %struct.pmd_part** %6
%10 = load %struct.driver_pmd*, %struct.driver_pmd** %5
%11 = load %struct.pmd_part*, %struct.pmd_part** %6
%12 = call i32 @pmd_part_cmdload(%struct.driver_pmd* %10, %struct.pmd_part* %11)
%13 = call i32 @pmd_part_set_pan(%struct.fmdriver_work* %7, %struct.driver_pmd* %8, %struct.pmd_part* %9, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.fmdriver_work = type { i32 }
%struct.driver_pmd = type { i32 }
%struct.pmd_part = type { i32 }
define void @pmd_cmdec_pan(%struct.fmdriver_work* %0, %struct.driver_pmd* %1, %struct.pmd_part* %2) {
%4 = tail call i32 @pmd_part_cmdload(%struct.driver_pmd* %1, %struct.pmd_part* %2)
%5 = tail call i32 @pmd_part_set_pan(%struct.fmdriver_work* %0, %struct.driver_pmd* %1, %struct.pmd_part* %2, i32 %4)
ret void
}
int greater_than_zero(int number) {
  int noname = 0;
  int ret = 0;
  if (number > 0) {
    ret = 1;
  } else {
    ret = 0;
  }
  return ret;
}


x86 assembly (clang, -O0):
<greater_than_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    112b <greater_than_zero+0x2b>
movl   $0x1,-0xc(%rbp)
jmp    1132 <greater_than_zero+0x32>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greater_than_zero>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
ret

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

LLVM IR (-O2):
define i32 @greater_than_zero(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_longlong_inc(long long *target, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_longlong_inc(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_longlong_inc(i64* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *malloc(size_t);
void *realloc(void *, size_t);
void *alloc(void *m, size_t n) {
  m = m == 0 ? malloc(n) : realloc(m, n);
  if (m == 0)
    fatal("");
  return m;
}


x86 assembly (clang, -O0):
<alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115d <alloc+0x2d>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
jmp    116e <alloc+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    118d <alloc+0x5d>
lea    0xe78(%rip),%rdi
call   1050 <fatal@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc>:
push   %rbx
test   %rdi,%rdi
je     113d <alloc+0xd>
call   1040 <realloc@plt>
jmp    1145 <alloc+0x15>
mov    %rsi,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1159 <alloc+0x29>
lea    0xeac(%rip),%rdi
call   1050 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @alloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %4
%9 = call i8* @malloc(i64 %8)
br label %14
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = call i8* @realloc(i8* %11, i64 %12)
br label %14
14: ; preds = %10, %7
%15 = phi i8* [ %9, %7 ], [ %13, %10 ]
store i8* %15, i8** %3
%16 = load i8*, i8** %3
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @fatal(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %20
20: ; preds = %18, %14
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @alloc(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i8* @malloc(i64 %1)
br label %8
6: ; preds = %2
%7 = tail call i8* @realloc(i8* %0, i64 %1)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ %7, %6 ]
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @fatal(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
ret i8* %9
}
/* Type definitions */
struct gsm_modul {
  int dummy;
};

/* Variables and functions */
int module_senddtmf(struct gsm_modul *, char);
int gsm_senddtmf(struct gsm_modul *gsm, char digit) {
  return module_senddtmf(gsm, digit);
}


x86 assembly (clang, -O0):
<gsm_senddtmf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <module_senddtmf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsm_senddtmf>:
jmp    1030 <module_senddtmf@plt>

LLVM IR (-O0):
%struct.gsm_modul = type { i32 }
define i32 @gsm_senddtmf(%struct.gsm_modul* %0, i8 signext %1) {
%3 = alloca %struct.gsm_modul*
%4 = alloca i8
store %struct.gsm_modul* %0, %struct.gsm_modul** %3
store i8 %1, i8* %4
%5 = load %struct.gsm_modul*, %struct.gsm_modul** %3
%6 = load i8, i8* %4
%7 = call i32 @module_senddtmf(%struct.gsm_modul* %5, i8 signext %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.gsm_modul = type { i32 }
define i32 @gsm_senddtmf(%struct.gsm_modul* %0, i8 signext %1) {
%3 = tail call i32 @module_senddtmf(%struct.gsm_modul* %0, i8 signext %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ outportb(int, int);
void timer_phase(int hz) {
  int divisor = 1193180 / hz;
  outportb(0x43, 0x36);
  outportb(0x40, divisor & 0xFF);
  outportb(0x40, divisor >> 8);
}


x86 assembly (clang, -O0):
<timer_phase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1234dc,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outportb@plt>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x40,%edi
call   1030 <outportb@plt>
mov    -0x8(%rbp),%esi
sar    $0x8,%esi
mov    $0x40,%edi
call   1030 <outportb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_phase>:
push   %rbx
mov    $0x1234dc,%eax
xor    %edx,%edx
idiv   %edi
mov    %eax,%ebx
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outportb@plt>
movzbl %bl,%esi
mov    $0x40,%edi
call   1030 <outportb@plt>
sar    $0x8,%ebx
mov    $0x40,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <outportb@plt>

LLVM IR (-O0):
define void @timer_phase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 1193180, %4
store i32 %5, i32* %3
%6 = call i32 @outportb(i32 67, i32 54)
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = call i32 @outportb(i32 64, i32 %8)
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = call i32 @outportb(i32 64, i32 %11)
ret void
}

LLVM IR (-O2):
define void @timer_phase(i32 %0) {
%2 = sdiv i32 1193180, %0
%3 = tail call i32 @outportb(i32 67, i32 54)
%4 = and i32 %2, 255
%5 = tail call i32 @outportb(i32 64, i32 %4)
%6 = ashr i32 %2, 8
%7 = tail call i32 @outportb(i32 64, i32 %6)
ret void
}
double SQR(double a) { return (a == 0.0 ? 0.0 : a * a); }


x86 assembly (clang, -O0):
<SQR>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112e <SQR+0x2e>
jp     112e <SQR+0x2e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113d <SQR+0x3d>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SQR>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpeqsd %xmm2,%xmm0
andnpd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @SQR(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fmul double %7, %8
br label %10
10: ; preds = %6, %5
%11 = phi double [ 0.000000e+00, %5 ], [ %9, %6 ]
ret double %11
}

LLVM IR (-O2):
define double @SQR(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
%3 = fmul double %0, %0
%4 = select i1 %2, double 0.000000e+00, double %3
ret double %4
}
debug_objsize() {
  {};
  {};
  {};
  {};
  {};
  {};
  {};
}


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

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

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

LLVM IR (-O2):
define i32 @debug_objsize() {
ret i32 undef
}
/* Variables and functions */
char *strdup(char const *);
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ wgmem_error(char *, int /*<<< orphan*/);
extern char *wg_strdup(const char *s) {
  char *result = strdup(s);
  if (!result) {
    wgmem_error("Error while strduping %u bytes.\n", strlen(s));
  }
  return (result);
}


x86 assembly (clang, -O0):
<wg_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116b <wg_strdup+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xe9a(%rip),%rdi
call   1040 <wgmem_error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wg_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115a <wg_strdup+0x2a>
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1040 <wgmem_error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Error while strduping %u bytes.\0A\00"
define i8* @wg_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @wgmem_error(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [33 x i8] c"Error while strduping %u bytes.\0A\00"
define noalias i8* @wg_strdup(i8* %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = tail call i32 @wgmem_error(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ drv_Newhaven_sendCommand(char, int /*<<< orphan*/ *,
                                            int /*<<< orphan*/);
void drv_Newhaven_clear(void) {
  char cmd;
  cmd = 0x51;
  drv_Newhaven_sendCommand(cmd, NULL, 0);
}


x86 assembly (clang, -O0):
<drv_Newhaven_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x51,-0x1(%rbp)
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
movsbl -0x1(%rbp),%edi
call   1030 <drv_Newhaven_sendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_Newhaven_clear>:
mov    $0x51,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <drv_Newhaven_sendCommand@plt>

LLVM IR (-O0):
define void @drv_Newhaven_clear() {
%1 = alloca i8
store i8 81, i8* %1
%2 = load i8, i8* %1
%3 = call i32 @drv_Newhaven_sendCommand(i8 signext %2, i32* null, i32 0)
ret void
}

LLVM IR (-O2):
define void @drv_Newhaven_clear() {
%1 = tail call i32 @drv_Newhaven_sendCommand(i8 signext 81, i32* null, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ isdigit(unsigned char);
const char *Skip_Digits(const char *string) {
  while (isdigit((unsigned char)string[0]))
    string++;
  return string;
}


x86 assembly (clang, -O0):
<Skip_Digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1143 <Skip_Digits+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <Skip_Digits+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Skip_Digits>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1120 <Skip_Digits+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @Skip_Digits(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isdigit(i8 zeroext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
long fifmod(long a, long b) { return a % b; }


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

x86 assembly (clang, -O2):
<fifmod>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1118 <fifmod+0x18>
cqto
idiv   %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @fifmod(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = srem i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @fifmod(i64 %0, i64 %1) {
%3 = srem i64 %0, %1
ret i64 %3
}
int is_null_pattern(pattern) void *pattern;
{ return (pattern == 0); }


x86 assembly (clang, -O0):
<is_null_pattern>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_null_pattern>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_null_pattern(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_null_pattern(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct slnode {
  int dummy;
};

/* Variables and functions */
struct slnode *cons(double, struct slnode *);
int /*<<< orphan*/ destroy_node(struct slnode *);
int /*<<< orphan*/ print_list(struct slnode *);
int main() {
  struct slnode *l = NULL;
  l = cons(1.2, l);
  l = cons(2.3, l);
  l = cons(3.4, l);
  print_list(l);
  destroy_node(l);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  0xebd(%rip),%xmm0
call   1040 <cons@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  0xea0(%rip),%xmm0
call   1040 <cons@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  0xe83(%rip),%xmm0
call   1040 <cons@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print_list@plt>
mov    -0x10(%rbp),%rdi
call   1050 <destroy_node@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xec7(%rip),%xmm0
xor    %edi,%edi
call   1040 <cons@plt>
movsd  0xec0(%rip),%xmm0
mov    %rax,%rdi
call   1040 <cons@plt>
movsd  0xeb8(%rip),%xmm0
mov    %rax,%rdi
call   1040 <cons@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <print_list@plt>
mov    %rbx,%rdi
call   1050 <destroy_node@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.slnode = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.slnode*
store i32 0, i32* %1
store %struct.slnode* null, %struct.slnode** %2
%3 = load %struct.slnode*, %struct.slnode** %2
%4 = call %struct.slnode* @cons(double 1.200000e+00, %struct.slnode* %3)
store %struct.slnode* %4, %struct.slnode** %2
%5 = load %struct.slnode*, %struct.slnode** %2
%6 = call %struct.slnode* @cons(double 2.300000e+00, %struct.slnode* %5)
store %struct.slnode* %6, %struct.slnode** %2
%7 = load %struct.slnode*, %struct.slnode** %2
%8 = call %struct.slnode* @cons(double 3.400000e+00, %struct.slnode* %7)
store %struct.slnode* %8, %struct.slnode** %2
%9 = load %struct.slnode*, %struct.slnode** %2
%10 = call i32 @print_list(%struct.slnode* %9)
%11 = load %struct.slnode*, %struct.slnode** %2
%12 = call i32 @destroy_node(%struct.slnode* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.slnode = type { i32 }
define i32 @main() {
%1 = tail call %struct.slnode* @cons(double 1.200000e+00, %struct.slnode* null)
%2 = tail call %struct.slnode* @cons(double 2.300000e+00, %struct.slnode* %1)
%3 = tail call %struct.slnode* @cons(double 3.400000e+00, %struct.slnode* %2)
%4 = tail call i32 @print_list(%struct.slnode* %3)
%5 = tail call i32 @destroy_node(%struct.slnode* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float n;
  scanf("%f", &n);
  printf("%.2f", n * 1.8 + 32);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xebc(%rip),%xmm0
addsd  0xebc(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.800000e+00, double 3.200000e+01)
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.800000e+00, double 3.200000e+01)
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void ft_write_header_and_main_to_file(int fd) {
  write(fd, "#include \"tools.h\"\n\nint\t\tmain(void)\n{\n", 38);
}


x86 assembly (clang, -O0):
<ft_write_header_and_main_to_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x26,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_write_header_and_main_to_file>:
lea    0xee9(%rip),%rsi
mov    $0x26,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"#include \22tools.h\22\0A\0Aint\09\09main(void)\0A{\0A\00"
define void @ft_write_header_and_main_to_file(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 38)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"#include \22tools.h\22\0A\0Aint\09\09main(void)\0A{\0A\00"
define void @ft_write_header_and_main_to_file(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 38)
ret void
}
/* Variables and functions */
int de_feat_is_supported_output_types(unsigned int, unsigned int);
int bsp_disp_feat_is_supported_output_types(unsigned int disp,
                                            unsigned int output_type) {
  return de_feat_is_supported_output_types(disp, output_type);
}


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

x86 assembly (clang, -O2):
<bsp_disp_feat_is_supported_output_types>:
jmp    1030 <de_feat_is_supported_output_types@plt>

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

LLVM IR (-O2):
define i32 @bsp_disp_feat_is_supported_output_types(i32 %0, i32 %1) {
%3 = tail call i32 @de_feat_is_supported_output_types(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *prog) { printf("usage: %s [test_num]\n", prog); }


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

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"usage: %s [test_num]\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}