xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_shuffle_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
__m128i PrefixSum2ints(__m128i curr, __m128i prev) {
  __m128i Add = _mm_slli_si128(curr, 4);
  prev = _mm_shuffle_epi32(prev, 0xff);
  curr = _mm_add_epi32(curr, Add);
  curr = _mm_shuffle_epi32(curr, 0x54);
  curr = _mm_add_epi32(curr, prev);
  return curr;
}


x86 assembly (clang, -O0):
<PrefixSum2ints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1050 <_mm_slli_si128@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0xff,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x54,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrefixSum2ints>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x4,%esi
call   1050 <_mm_slli_si128@plt>
mov    %eax,%ebx
mov    %r14d,%edi
mov    $0xff,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,%edi
mov    $0x54,%esi
call   1040 <_mm_shuffle_epi32@plt>
mov    %eax,%edi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <_mm_add_epi32@plt>

LLVM IR (-O0):
define i32 @PrefixSum2ints(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @_mm_slli_si128(i32 %6, i32 4)
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = call i32 @_mm_shuffle_epi32(i32 %8, i32 255)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = call i32 @_mm_add_epi32(i32 %10, i32 %11)
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = call i32 @_mm_shuffle_epi32(i32 %13, i32 84)
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @_mm_add_epi32(i32 %15, i32 %16)
store i32 %17, i32* %3
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @PrefixSum2ints(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_slli_si128(i32 %0, i32 4)
%4 = tail call i32 @_mm_shuffle_epi32(i32 %1, i32 255)
%5 = tail call i32 @_mm_add_epi32(i32 %0, i32 %3)
%6 = tail call i32 @_mm_shuffle_epi32(i32 %5, i32 84)
%7 = tail call i32 @_mm_add_epi32(i32 %6, i32 %4)
ret i32 %7
}
/* Variables and functions */
int memcpy(int, int, int);
memcpy_fromfs(int x, int y, int z) { return memcpy(x, y, z); }


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

x86 assembly (clang, -O2):
<memcpy_fromfs>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i32 @memcpy_fromfs(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @memcpy(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
struct list_head {
  int dummy;
};
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int prefix_list_find(struct list_head *, struct in6_addr const *, int);
int mn_is_at_home(struct list_head *prefixes,
                  const struct in6_addr *home_prefix, int home_plen) {
  return prefix_list_find(prefixes, home_prefix, home_plen);
}


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

x86 assembly (clang, -O2):
<mn_is_at_home>:
jmp    1030 <prefix_list_find@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
%struct.in6_addr = type { i32 }
define i32 @mn_is_at_home(%struct.list_head* %0, %struct.in6_addr* %1, i32 %2) {
%4 = alloca %struct.list_head*
%5 = alloca %struct.in6_addr*
%6 = alloca i32
store %struct.list_head* %0, %struct.list_head** %4
store %struct.in6_addr* %1, %struct.in6_addr** %5
store i32 %2, i32* %6
%7 = load %struct.list_head*, %struct.list_head** %4
%8 = load %struct.in6_addr*, %struct.in6_addr** %5
%9 = load i32, i32* %6
%10 = call i32 @prefix_list_find(%struct.list_head* %7, %struct.in6_addr* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
%struct.in6_addr = type { i32 }
define i32 @mn_is_at_home(%struct.list_head* %0, %struct.in6_addr* %1, i32 %2) {
%4 = tail call i32 @prefix_list_find(%struct.list_head* %0, %struct.in6_addr* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ proctal_implementation_resume(struct proctal *);
void proctal_resume(struct proctal *p) { proctal_implementation_resume(p); }


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

x86 assembly (clang, -O2):
<proctal_resume>:
jmp    1030 <proctal_implementation_resume@plt>

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

LLVM IR (-O2):
%struct.proctal = type { i32 }
define void @proctal_resume(%struct.proctal* %0) {
%2 = tail call i32 @proctal_implementation_resume(%struct.proctal* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int send_event;
};
typedef TYPE_1__ XVisibilityEvent;

/* Variables and functions */
void set_XVisibilityEvent_send_event(void *_p, int _v) {
  ((XVisibilityEvent *)_p)->send_event = (int)_v;
}


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

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

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

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

/* Variables and functions */
int keypad(WINDOW *w, bool b) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @keypad(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
unsigned long long PRCMSlowClkCtrFastGet(void) {
  unsigned long long ullRTCVal;
  ullRTCVal = (*((volatile unsigned long *)(0x4402F000 + 0x000000D0)));
  ullRTCVal = ullRTCVal << 32;
  ullRTCVal |= (*((volatile unsigned long *)(0x4402F000 + 0x000000CC)));
  return ullRTCVal;
}


x86 assembly (clang, -O0):
<PRCMSlowClkCtrFastGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4402f0d0,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x20,%rax
mov    %rax,-0x8(%rbp)
mov    $0x4402f0cc,%eax
mov    (%rax),%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMSlowClkCtrFastGet>:
mov    0x4402f0d0,%rax
44
shl    $0x20,%rax
or     0x4402f0cc,%rax
44
ret

LLVM IR (-O0):
define i64 @PRCMSlowClkCtrFastGet() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 1141043408 to i64*)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = shl i64 %3, 32
store i64 %4, i64* %1
%5 = load volatile i64, i64* inttoptr (i64 1141043404 to i64*)
%6 = load i64, i64* %1
%7 = or i64 %6, %5
store i64 %7, i64* %1
%8 = load i64, i64* %1
ret i64 %8
}

LLVM IR (-O2):
define i64 @PRCMSlowClkCtrFastGet() {
%1 = load volatile i64, i64* inttoptr (i64 1141043408 to i64*)
%2 = shl i64 %1, 32
%3 = load volatile i64, i64* inttoptr (i64 1141043404 to i64*)
%4 = or i64 %2, %3
ret i64 %4
}
/* Variables and functions */
int foo1();
int main() { return foo1(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo1()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ DCSMReadZone1EXEONLY();
unsigned long DCSMGetZone1EXEstatus(unsigned long sector) {
  ;
  DCSMReadZone1EXEONLY();
  if ((((*((volatile unsigned long *)(0x400FB400 + 0x000000B0))) >> sector) &
       0x00000001) == 1) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<DCSMGetZone1EXEstatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <DCSMReadZone1EXEONLY@plt>
mov    $0x400fb4b0,%eax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
shr    %cl,%rax
and    $0x1,%rax
cmp    $0x1,%rax
jne    114d <DCSMGetZone1EXEstatus+0x3d>
movq   $0x1,-0x8(%rbp)
jmp    1155 <DCSMGetZone1EXEstatus+0x45>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DCSMGetZone1EXEstatus>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <DCSMReadZone1EXEONLY@plt>
mov    0x400fb4b0,%rax
40
mov    %ebx,%ecx
shr    %cl,%rax
and    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @DCSMGetZone1EXEstatus(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = call i32 (...) @DCSMReadZone1EXEONLY()
%5 = load volatile i64, i64* inttoptr (i64 1074771120 to i64*)
%6 = load i64, i64* %3
%7 = lshr i64 %5, %6
%8 = and i64 %7, 1
%9 = icmp eq i64 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %1
store i64 1, i64* %2
br label %12
11: ; preds = %1
store i64 0, i64* %2
br label %12
12: ; preds = %11, %10
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @DCSMGetZone1EXEstatus(i64 %0) {
%2 = tail call i32 (...) @DCSMReadZone1EXEONLY()
%3 = load volatile i64, i64* inttoptr (i64 1074771120 to i64*)
%4 = lshr i64 %3, %0
%5 = and i64 %4, 1
ret i64 %5
}
/* Variables and functions */
int *calloc(int, int);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char c;
  int *p = NULL;
  p = calloc(1500, 1024000);
  while (c != 'q') {
    scanf("%c", &c);
  }
  free(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x5dc,%edi
mov    $0xfa000,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
je     117c <main+0x4c>
lea    0xe92(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
jmp    115a <main+0x2a>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x5dc,%edi
mov    $0xfa000,%esi
call   1040 <calloc@plt>
mov    %rax,%r14
lea    0xeae(%rip),%r15
lea    0xf(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmpb   $0x71,0xf(%rsp)
jne    1160 <main+0x30>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %3
%4 = call i32* @calloc(i32 1500, i32 1024000)
store i32* %4, i32** %3
br label %5
5: ; preds = %9, %0
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 113
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %5
11: ; preds = %5
%12 = load i32*, i32** %3
%13 = call i32 @free(i32* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32* @calloc(i32 1500, i32 1024000)
br label %3
3: ; preds = %0, %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 113
br i1 %6, label %7, label %3
7: ; preds = %3
%8 = call i32 @free(i32* %2)
ret i32 0
}
/* Variables and functions */
double M_PI;
double ephDegToRad(double deg) { return deg * M_PI / 180.0; }


x86 assembly (clang, -O0):
<ephDegToRad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xedf(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ephDegToRad>:
mov    0x2ee1(%rip),%rax
mulsd  (%rax),%xmm0
divsd  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @ephDegToRad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @M_PI
%5 = fmul double %3, %4
%6 = fdiv double %5, 1.800000e+02
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @ephDegToRad(double %0) {
%2 = load double, double* @M_PI
%3 = fmul double %2, %0
%4 = fdiv double %3, 1.800000e+02
ret double %4
}
/* Variables and functions */
void init() {}


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

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

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

LLVM IR (-O2):
define void @init() {
ret void
}
int compare_floats(const void *aa, const void *bb) {
  const float *a = (const float *)aa;
  const float *b = (const float *)bb;
  return (*a > *b) - (*a < *b);
}


x86 assembly (clang, -O0):
<compare_floats>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
movss  (%rcx),%xmm1
mov    -0x20(%rbp),%rcx
movss  (%rcx),%xmm0
ucomiss %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_floats>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_floats(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca float*
%6 = alloca float*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to float*
store float* %8, float** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to float*
store float* %10, float** %6
%11 = load float*, float** %5
%12 = load float, float* %11
%13 = load float*, float** %6
%14 = load float, float* %13
%15 = fcmp ogt float %12, %14
%16 = zext i1 %15 to i32
%17 = load float*, float** %5
%18 = load float, float* %17
%19 = load float*, float** %6
%20 = load float, float* %19
%21 = fcmp olt float %18, %20
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @compare_floats(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = bitcast i8* %1 to float*
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
%8 = zext i1 %7 to i32
%9 = fcmp olt float %5, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int *b;
};
typedef TYPE_1__ uuid_le;

/* Variables and functions */
int /*<<< orphan*/ __uuid_gen_common(int *);
void uuid_le_gen(uuid_le *lu) {
  __uuid_gen_common(lu->b);
  lu->b[7] = (lu->b[7] & 0x0F) | 0x40;
}


x86 assembly (clang, -O0):
<uuid_le_gen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <__uuid_gen_common@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x1c(%rax),%ecx
and    $0xf,%ecx
or     $0x40,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x1c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uuid_le_gen>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <__uuid_gen_common@plt>
mov    (%rbx),%rax
mov    0x1c(%rax),%ecx
and    $0xf,%ecx
or     $0x40,%ecx
mov    %ecx,0x1c(%rax)
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32* }
define void @uuid_le_gen(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = call i32 @__uuid_gen_common(i32* %5)
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 0
%9 = load i32*, i32** %8
%10 = getelementptr inbounds i32, i32* %9, i64 7
%11 = load i32, i32* %10
%12 = and i32 %11, 15
%13 = or i32 %12, 64
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i32 0, i32 0
%16 = load i32*, i32** %15
%17 = getelementptr inbounds i32, i32* %16, i64 7
store i32 %13, i32* %17
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32* }
define void @uuid_le_gen(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32*, i32** %2
%4 = tail call i32 @__uuid_gen_common(i32* %3)
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 7
%7 = load i32, i32* %6
%8 = and i32 %7, 15
%9 = or i32 %8, 64
store i32 %9, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cylinder(int, int, int);
int /*<<< orphan*/ diff();
int /*<<< orphan*/ enddiff();
int /*<<< orphan*/ finalize();
int /*<<< orphan*/ opencscad_init();
int main(int argc, char *argv[]) {
  opencscad_init();
  diff();
  cylinder(10, 10, 10);
  cylinder(10, 8, 8);
  enddiff();
  finalize();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <opencscad_init@plt>
mov    $0x0,%al
call   1070 <diff@plt>
mov    $0xa,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <cylinder@plt>
mov    $0xa,%edi
mov    $0x8,%edx
mov    %edx,%esi
call   1030 <cylinder@plt>
mov    $0x0,%al
call   1050 <enddiff@plt>
mov    $0x0,%al
call   1040 <finalize@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <opencscad_init@plt>
xor    %eax,%eax
call   1070 <diff@plt>
mov    $0xa,%edi
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <cylinder@plt>
mov    $0xa,%edi
mov    $0x8,%esi
mov    $0x8,%edx
call   1030 <cylinder@plt>
xor    %eax,%eax
call   1050 <enddiff@plt>
xor    %eax,%eax
call   1040 <finalize@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @opencscad_init()
%6 = call i32 (...) @diff()
%7 = call i32 @cylinder(i32 10, i32 10, i32 10)
%8 = call i32 @cylinder(i32 10, i32 8, i32 8)
%9 = call i32 (...) @enddiff()
%10 = call i32 (...) @finalize()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @opencscad_init()
%4 = tail call i32 (...) @diff()
%5 = tail call i32 @cylinder(i32 10, i32 10, i32 10)
%6 = tail call i32 @cylinder(i32 10, i32 8, i32 8)
%7 = tail call i32 (...) @enddiff()
%8 = tail call i32 (...) @finalize()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug_crash_to_gui();
void badop(void) { debug_crash_to_gui(); }


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

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

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

LLVM IR (-O2):
define void @badop() {
%1 = tail call i32 (...) @debug_crash_to_gui()
ret void
}
/* Variables and functions */
scalar_t__ lgamma_r(double, int *);
float lgammaf_r(float x, int *psigngam) {
  return (float)lgamma_r((double)x, psigngam);
}


x86 assembly (clang, -O0):
<lgammaf_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rdi
call   1030 <lgamma_r@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lgammaf_r>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <lgamma_r@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @lgammaf_r(float %0, i32* %1) {
%3 = alloca float
%4 = alloca i32*
store float %0, float* %3
store i32* %1, i32** %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load i32*, i32** %4
%8 = call i64 @lgamma_r(double %6, i32* %7)
%9 = sitofp i64 %8 to float
ret float %9
}

LLVM IR (-O2):
define float @lgammaf_r(float %0, i32* %1) {
%3 = fpext float %0 to double
%4 = tail call i64 @lgamma_r(double %3, i32* %1)
%5 = sitofp i64 %4 to float
ret float %5
}
int thermal_netlink_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @thermal_netlink_init() {
ret i32 0
}
/* Type definitions */
struct vector {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ vec_resize(struct vector *, int /*<<< orphan*/);
void vec_destroy(struct vector *v) {
  assert(v != NULL);
  vec_resize(v, 0);
}


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

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

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

LLVM IR (-O2):
%struct.vector = type { i32 }
define void @vec_destroy(%struct.vector* %0) {
%2 = icmp ne %struct.vector* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @vec_resize(%struct.vector* %0, i32 0)
ret void
}
/* Variables and functions */
double pow(double, int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double pi = 3.14159;
  double radius;
  scanf("%lf", &radius);
  double result = (4.0 / 3) * pi * pow(radius, 3);
  printf("VOLUME = %.3f\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xe9c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
mulsd  0xea9(%rip),%xmm0
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [15 x i8] c"VOLUME = %.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 3.141590e+00, double* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %2
%7 = fmul double 0x3FF5555555555555, %6
%8 = load double, double* %3
%9 = call double @pow(double %8, i32 3)
%10 = fmul double %7, %9
store double %10, double* %4
%11 = load double, double* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [15 x i8] c"VOLUME = %.3f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call double @pow(double %4, i32 3)
%6 = fmul double %5, 0x4010C1514ABD0449
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
double ndtr(double);
double normal_cdf(double x) { return ndtr(x); }


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

x86 assembly (clang, -O2):
<normal_cdf>:
jmp    1030 <ndtr@plt>

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

LLVM IR (-O2):
define double @normal_cdf(double %0) {
%2 = tail call double @ndtr(double %0)
ret double %2
}
double POW10(int val) {
  double result = 1;
  while (val) {
    result *= 10;
    val--;
  }
  return result;
}


x86 assembly (clang, -O0):
<POW10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <POW10+0x3e>
movsd  0xee2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1114 <POW10+0x14>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<POW10>:
test   %edi,%edi
je     1134 <POW10+0x34>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
je     113d <POW10+0x3d>
xor    %edx,%edx
movsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x1,%edx
cmp    %edx,%ecx
jne    1120 <POW10+0x20>
sub    %edx,%edi
cmp    $0x7,%eax
jae    114a <POW10+0x4a>
jmp    1185 <POW10+0x85>
movsd  0xec4(%rip),%xmm0
ret
movsd  0xebb(%rip),%xmm0
cmp    $0x7,%eax
jb     1185 <POW10+0x85>
movsd  0xeb6(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
add    $0xfffffff8,%edi
jne    1160 <POW10+0x60>
ret

LLVM IR (-O0):
define double @POW10(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
store double 1.000000e+00, double* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load double, double* %3
%9 = fmul double %8, 1.000000e+01
store double %9, double* %3
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @POW10(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %33, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp eq i32 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %3, %7
%8 = phi double [ %11, %7 ], [ 1.000000e+00, %3 ]
%9 = phi i32 [ %12, %7 ], [ %0, %3 ]
%10 = phi i32 [ %13, %7 ], [ 0, %3 ]
%11 = fmul double %8, 1.000000e+01
%12 = add nsw i32 %9, -1
%13 = add i32 %10, 1
%14 = icmp eq i32 %13, %5
br i1 %14, label %15, label %7
15: ; preds = %7, %3
%16 = phi double [ undef, %3 ], [ %11, %7 ]
%17 = phi double [ 1.000000e+00, %3 ], [ %11, %7 ]
%18 = phi i32 [ %0, %3 ], [ %12, %7 ]
%19 = icmp ult i32 %4, 7
br i1 %19, label %33, label %20
20: ; preds = %15, %20
%21 = phi double [ %30, %20 ], [ %17, %15 ]
%22 = phi i32 [ %31, %20 ], [ %18, %15 ]
%23 = fmul double %21, 1.000000e+01
%24 = fmul double %23, 1.000000e+01
%25 = fmul double %24, 1.000000e+01
%26 = fmul double %25, 1.000000e+01
%27 = fmul double %26, 1.000000e+01
%28 = fmul double %27, 1.000000e+01
%29 = fmul double %28, 1.000000e+01
%30 = fmul double %29, 1.000000e+01
%31 = add nsw i32 %22, -8
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %20
33: ; preds = %15, %20, %1
%34 = phi double [ 1.000000e+00, %1 ], [ %16, %15 ], [ %30, %20 ]
ret double %34
}
void mdp4_dtv_set_black_screen(void) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_dtv_set_black_screen() {
ret void
}
unsigned c(unsigned x, unsigned y) { return x > x + y; }


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
xor    %eax,%eax
add    %esi,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @c(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 = add i32 %6, %7
%9 = icmp ugt i32 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @c(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = icmp ult i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ __be_u32(void *);
int32_t __be_s32(void *p) { return (int32_t)__be_u32(p); }


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

x86 assembly (clang, -O2):
<__be_s32>:
jmp    1030 <__be_u32@plt>

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

LLVM IR (-O2):
define i32 @__be_s32(i8* %0) {
%2 = tail call i32 @__be_u32(i8* %0)
ret i32 %2
}
double g_H(t)
double t;
{
  if (t == 0.0) {
    return 0.0;
  }
  return 5.85e-11 * sqrt(t) * exp(-157809.1 / t) / (1.0 + sqrt(t / 1e5));
}


x86 assembly (clang, -O0):
<g_H>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1152 <g_H+0x32>
jp     1152 <g_H+0x32>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c6 <g_H+0xa6>
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe98(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe68(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movsd  0xe47(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_H>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1131 <g_H+0x11>
jp     1131 <g_H+0x11>
movapd %xmm1,%xmm0
ret
sub    $0x18,%rsp
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
jb     114b <g_H+0x2b>
sqrtsd %xmm0,%xmm0
jmp    1150 <g_H+0x30>
call   1040 <sqrt@plt>
mulsd  0xea8(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xea2(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm1
divsd  0xe87(%rip),%xmm0
ucomisd 0xe8f(%rip),%xmm0
jb     1199 <g_H+0x79>
sqrtsd %xmm0,%xmm0
jmp    11aa <g_H+0x8a>
movsd  %xmm1,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xe66(%rip),%xmm0
divsd  %xmm0,%xmm1
add    $0x18,%rsp
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @g_H(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %20
7: ; preds = %1
%8 = load double, double* %3
%9 = call double @sqrt(double %8)
%10 = fmul double 5.850000e-11, %9
%11 = load double, double* %3
%12 = fdiv double 0xC1034388CCCCCCCD, %11
%13 = call double @exp(double %12)
%14 = fmul double %10, %13
%15 = load double, double* %3
%16 = fdiv double %15, 1.000000e+05
%17 = call double @sqrt(double %16)
%18 = fadd double 1.000000e+00, %17
%19 = fdiv double %14, %18
store double %19, double* %2
br label %20
20: ; preds = %7, %6
%21 = load double, double* %2
ret double %21
}

LLVM IR (-O2):
define double @g_H(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call double @sqrt(double %0)
%5 = fmul double %4, 5.850000e-11
%6 = fdiv double 0xC1034388CCCCCCCD, %0
%7 = tail call double @exp(double %6)
%8 = fmul double %5, %7
%9 = fdiv double %0, 1.000000e+05
%10 = tail call double @sqrt(double %9)
%11 = fadd double %10, 1.000000e+00
%12 = fdiv double %8, %11
br label %13
13: ; preds = %1, %3
%14 = phi double [ %12, %3 ], [ 0.000000e+00, %1 ]
ret double %14
}
/* Variables and functions */
char getchar();
void eatline(void) {
  while (getchar() != '\n') {
    continue;
  }
}


x86 assembly (clang, -O0):
<eatline>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <eatline+0x9>
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1131 <eatline+0x21>
jmp    1119 <eatline+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eatline>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <eatline+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @eatline() {
br label %1
1: ; preds = %5, %0
%2 = call signext i8 (...) @getchar()
%3 = sext i8 %2 to i32
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @eatline() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CrestCall(int, int);
int /*<<< orphan*/ __CrestReturn(int);
void isCopyOfHolder(void) {
  {
    __CrestCall(47, 6);
    {
      __CrestReturn(48);
      return;
    }
  }
}


x86 assembly (clang, -O0):
<isCopyOfHolder>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%edi
mov    $0x6,%esi
call   1040 <__CrestCall@plt>
mov    $0x30,%edi
call   1030 <__CrestReturn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isCopyOfHolder>:
push   %rax
mov    $0x2f,%edi
mov    $0x6,%esi
call   1040 <__CrestCall@plt>
mov    $0x30,%edi
pop    %rax
jmp    1030 <__CrestReturn@plt>

LLVM IR (-O0):
define void @isCopyOfHolder() {
%1 = call i32 @__CrestCall(i32 47, i32 6)
%2 = call i32 @__CrestReturn(i32 48)
ret void
}

LLVM IR (-O2):
define void @isCopyOfHolder() {
%1 = tail call i32 @__CrestCall(i32 47, i32 6)
%2 = tail call i32 @__CrestReturn(i32 48)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ defmac(char *);
void initmac(void) { defmac("smallc\t1"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"smallc\091\00"
define void @initmac() {
%1 = call i32 @defmac(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"smallc\091\00"
define void @initmac() {
%1 = tail call i32 @defmac(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, size_t);
int /*<<< orphan*/ stderr;
void out_of_memory(const char *type, size_t size) {
  fprintf(stderr, "(%s) failed to allocate %d bytes, exiting...\n", type, size);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<out_of_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<out_of_memory>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"(%s) failed to allocate %d bytes, exiting...\0A\00"
@EXIT_FAILURE = global i32 0
define void @out_of_memory(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %6, i64 %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"(%s) failed to allocate %d bytes, exiting...\0A\00"
@EXIT_FAILURE = global i32 0
define void @out_of_memory(i8* %0, i64 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char dummy[80];
  printf("Enter a string:\n");
  scanf("%[^a]", dummy);
  printf("%s\n", dummy);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x60(%rbp),%rsi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%[^a]\00"
@str = [16 x i8] c"Enter a string:\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @puts(i8* %2)
ret i32 0
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int __syscall_ret(int /*<<< orphan*/);
int sched_getparam(pid_t pid, struct sched_param *param) {
  return __syscall_ret(-ENOSYS);
}


x86 assembly (clang, -O0):
<sched_getparam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    0x2ec0(%rip),%rax
sub    (%rax),%edi
call   1030 <__syscall_ret@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sched_getparam>:
mov    0x2ed1(%rip),%rax
xor    %edi,%edi
sub    (%rax),%edi
jmp    1030 <__syscall_ret@plt>

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@ENOSYS = global i32 0
define i32 @sched_getparam(i32 %0, %struct.sched_param* %1) {
%3 = alloca i32
%4 = alloca %struct.sched_param*
store i32 %0, i32* %3
store %struct.sched_param* %1, %struct.sched_param** %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
%7 = call i32 @__syscall_ret(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@ENOSYS = global i32 0
define i32 @sched_getparam(i32 %0, %struct.sched_param* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
%5 = tail call i32 @__syscall_ret(i32 %4)
ret i32 %5
}
void *LoadPointer(void **addr) {
  void *v;
  v = *addr;
  while (!__sync_bool_compare_and_swap(addr, v, v))
    v = *addr;
  return v;
}


x86 assembly (clang, -O0):
<LoadPointer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rdx
mov    %rdx,%rax
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
xor    $0xff,%al
test   $0x1,%al
jne    1138 <LoadPointer+0x38>
jmp    1148 <LoadPointer+0x48>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
jmp    1113 <LoadPointer+0x13>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadPointer>:
mov    (%rdi),%rcx
mov    %rcx,%rax
lock cmpxchg %rcx,(%rdi)
jne    1100 <LoadPointer>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @LoadPointer(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
store i8* %5, i8** %3
br label %6
6: ; preds = %16, %1
%7 = load i8**, i8*** %2
%8 = bitcast i8** %7 to i64*
%9 = load i8*, i8** %3
%10 = ptrtoint i8* %9 to i64
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %11 to i64
%13 = cmpxchg i64* %8, i64 %10, i64 %12 seq_cst seq_cst
%14 = extractvalue { i64, i1 } %13, 1
%15 = xor i1 %14, true
br i1 %15, label %16, label %19
16: ; preds = %6
%17 = load i8**, i8*** %2
%18 = load i8*, i8** %17
store i8* %18, i8** %3
br label %6
19: ; preds = %6
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define i8* @LoadPointer(i8** nocapture %0) {
%2 = bitcast i8** %0 to i64*
br label %3
3: ; preds = %3, %1
%4 = load i8*, i8** %0
%5 = ptrtoint i8* %4 to i64
%6 = cmpxchg i64* %2, i64 %5, i64 %5 seq_cst seq_cst
%7 = extractvalue { i64, i1 } %6, 1
br i1 %7, label %8, label %3
8: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare_strings(const void *str1, const void *str2) {
  return (strcmp((const char *)str1, (const char *)str2));
}


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

x86 assembly (clang, -O2):
<compare_strings>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare_strings(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
unsigned long int unsignedlongint_ignoring_longint(unsigned long int x,
                                                   long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlongint_ignoring_longint(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
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlongint_ignoring_longint(i64 returned %0, i64 %1) {
ret i64 %0
}
XGetInputFocus() {}


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

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

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

LLVM IR (-O2):
define i32 @XGetInputFocus() {
ret i32 undef
}