xunge/DecIR huggingface dataset:
int OrdCresc(int a) {
  int max = a % 10;
  a = a / 10;
  while (a != 0) {
    if (a % 10 > max)
      return 0;
    else {
      max = a % 10;
      a = a / 10;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<OrdCresc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116e <OrdCresc+0x6e>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    -0xc(%rbp),%edx
jle    114d <OrdCresc+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1175 <OrdCresc+0x75>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1123 <OrdCresc+0x23>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OrdCresc>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
xchg   %ax,%ax
lea    0x9(%rdi),%ecx
cmp    $0x13,%ecx
jb     1166 <OrdCresc+0x66>
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdi
add    %ecx,%edi
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
cmp    %eax,%ecx
mov    %ecx,%eax
jle    1120 <OrdCresc+0x20>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @OrdCresc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = srem i32 %5, 10
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = sdiv i32 %7, 10
store i32 %8, i32* %3
br label %9
9: ; preds = %23, %1
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i32, i32* %3
%14 = srem i32 %13, 10
%15 = load i32, i32* %4
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %12
store i32 0, i32* %2
br label %25
18: ; preds = %12
%19 = load i32, i32* %3
%20 = srem i32 %19, 10
store i32 %20, i32* %4
%21 = load i32, i32* %3
%22 = sdiv i32 %21, 10
store i32 %22, i32* %3
br label %23
23: ; preds = %18
br label %9
24: ; preds = %9
store i32 1, i32* %2
br label %25
25: ; preds = %24, %17
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @OrdCresc(i32 %0) {
%2 = srem i32 %0, 10
br label %3
3: ; preds = %9, %1
%4 = phi i32 [ %0, %1 ], [ %6, %9 ]
%5 = phi i32 [ %2, %1 ], [ %10, %9 ]
%6 = sdiv i32 %4, 10
%7 = add i32 %4, 9
%8 = icmp ult i32 %7, 19
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = srem i32 %6, 10
%11 = icmp sgt i32 %10, %5
br i1 %11, label %12, label %3
12: ; preds = %3, %9
%13 = phi i32 [ 0, %9 ], [ 1, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void far_away(void) { _exit(0); }


x86 assembly (clang, -O0):
<far_away>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<far_away>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @far_away() {
%1 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @far_away() {
%1 = tail call i32 @_exit(i32 0)
unreachable
}
void find(int d) {}


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

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

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

LLVM IR (-O2):
define void @find(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ StabilizationSettingsBank2Handle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void StabilizationSettingsBank2RequestUpdate() {
  UAVObjRequestUpdate(StabilizationSettingsBank2Handle());
}


x86 assembly (clang, -O0):
<StabilizationSettingsBank2RequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <StabilizationSettingsBank2Handle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StabilizationSettingsBank2RequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <StabilizationSettingsBank2Handle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @StabilizationSettingsBank2RequestUpdate() {
%1 = call i32 (...) @StabilizationSettingsBank2Handle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @StabilizationSettingsBank2RequestUpdate() {
%1 = tail call i32 (...) @StabilizationSettingsBank2Handle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
float CLOCKS_PER_SEC;
scalar_t__ clock();
float startClock() { return (float)clock() / CLOCKS_PER_SEC; }


x86 assembly (clang, -O0):
<startClock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clock@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
divss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<startClock>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
divss  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global float 0.000000e+00
define float @startClock() {
%1 = call i64 (...) @clock()
%2 = sitofp i64 %1 to float
%3 = load float, float* @CLOCKS_PER_SEC
%4 = fdiv float %2, %3
ret float %4
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global float 0.000000e+00
define float @startClock() {
%1 = tail call i64 (...) @clock()
%2 = sitofp i64 %1 to float
%3 = load float, float* @CLOCKS_PER_SEC
%4 = fdiv float %2, %3
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void oom_die() {
  fprintf(stderr, "out of memory");
  abort();
}


x86 assembly (clang, -O0):
<oom_die>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<oom_die>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"out of memory\00"
define void @oom_die() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"out of memory\00"
define void @oom_die() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
unsigned long hash_32(unsigned long, unsigned int);
unsigned long hash_ptr(const void *ptr, unsigned int bits) {
  return hash_32((unsigned long)ptr, bits);
}


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

x86 assembly (clang, -O2):
<hash_ptr>:
jmp    1030 <hash_32@plt>

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

LLVM IR (-O2):
define i64 @hash_ptr(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i64 @hash_32(i64 %3, i32 %1)
ret i64 %4
}
/* Type definitions */
struct sbusDevice {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeDevice(struct device *);
void sbusFreeDevice(struct sbusDevice *dev) {
  freeDevice((struct device *)dev);
}


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

x86 assembly (clang, -O2):
<sbusFreeDevice>:
jmp    1030 <freeDevice@plt>

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

LLVM IR (-O2):
%struct.sbusDevice = type { i32 }
%struct.device = type { i32 }
define void @sbusFreeDevice(%struct.sbusDevice* %0) {
%2 = bitcast %struct.sbusDevice* %0 to %struct.device*
%3 = tail call i32 @freeDevice(%struct.device* %2)
ret void
}
/* Variables and functions */
double erf(double);
int /*<<< orphan*/ printf(char *, double);
double sqrt(int);
int main() {
  printf("The integral of a Normal(0, 1) distribution "
         "between -1.96 and 1.96 is: %g\n",
         erf(1.96 * sqrt(1 / 2.)));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xeba(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <erf@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <sqrt@plt>
mulsd  0xec0(%rip),%xmm0
call   1050 <erf@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [75 x i8] c"The integral of a Normal(0, 1) distribution between -1.96 and 1.96 is: %g\0A\00"
define i32 @main() {
%1 = call double @sqrt(i32 0)
%2 = fmul double 1.960000e+00, %1
%3 = call double @erf(double %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [75 x i8] c"The integral of a Normal(0, 1) distribution between -1.96 and 1.96 is: %g\0A\00"
define i32 @main() {
%1 = tail call double @sqrt(i32 0)
%2 = fmul double %1, 1.960000e+00
%3 = tail call double @erf(double %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
extern void keeper(int sig) {}


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

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

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

LLVM IR (-O2):
define void @keeper(i32 %0) {
ret void
}
/* Variables and functions */
char **_M_allocate();
void _M_fill_insert(unsigned int __n) {
  char **__new_start = _M_allocate();
  char *__tmp = 0;
  for (; __n > 0; --__n, ++__new_start)
    *__new_start = __tmp;
}


x86 assembly (clang, -O0):
<_M_fill_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <_M_allocate@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    115d <_M_fill_insert+0x4d>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    112e <_M_fill_insert+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_M_fill_insert>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <_M_allocate@plt>
test   %ebx,%ebx
je     113e <_M_fill_insert+0x1e>
mov    %ebx,%edx
shl    $0x3,%rdx
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @_M_fill_insert(i32 %0) {
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i8*
store i32 %0, i32* %2
%5 = call i8** (...) @_M_allocate()
store i8** %5, i8*** %3
store i8* null, i8** %4
br label %6
6: ; preds = %12, %1
%7 = load i32, i32* %2
%8 = icmp ugt i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i8*, i8** %4
%11 = load i8**, i8*** %3
store i8* %10, i8** %11
br label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = add i32 %13, -1
store i32 %14, i32* %2
%15 = load i8**, i8*** %3
%16 = getelementptr inbounds i8*, i8** %15, i32 1
store i8** %16, i8*** %3
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @_M_fill_insert(i32 %0) {
%2 = tail call i8** (...) @_M_allocate()
%3 = icmp eq i32 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = bitcast i8** %2 to i8*
%6 = zext i32 %0 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %1
ret void
}
void foo196() {}


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

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

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

LLVM IR (-O2):
define void @foo196() {
ret void
}
/* Variables and functions */
double sqrt(double);
double C3(int n, int m) {
  return (
      sqrt((double)((n - 1) * (n - 1) - m * m) / ((double)(n * n - m * m))));
}


x86 assembly (clang, -O0):
<C3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C3>:
lea    -0x1(%rdi),%eax
imul   %eax,%eax
imul   %esi,%esi
sub    %esi,%eax
cvtsi2sd %eax,%xmm0
imul   %edi,%edi
sub    %esi,%edi
cvtsi2sd %edi,%xmm1
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113b <C3+0x2b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @C3(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 = sub nsw i32 %5, 1
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = mul nsw i32 %6, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
%13 = sub nsw i32 %9, %12
%14 = sitofp i32 %13 to double
%15 = load i32, i32* %3
%16 = load i32, i32* %3
%17 = mul nsw i32 %15, %16
%18 = load i32, i32* %4
%19 = load i32, i32* %4
%20 = mul nsw i32 %18, %19
%21 = sub nsw i32 %17, %20
%22 = sitofp i32 %21 to double
%23 = fdiv double %14, %22
%24 = call double @sqrt(double %23)
ret double %24
}

LLVM IR (-O2):
define double @C3(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = mul nsw i32 %3, %3
%5 = mul nsw i32 %1, %1
%6 = sub nsw i32 %4, %5
%7 = sitofp i32 %6 to double
%8 = mul nsw i32 %0, %0
%9 = sub nsw i32 %8, %5
%10 = sitofp i32 %9 to double
%11 = fdiv double %7, %10
%12 = tail call double @sqrt(double %11)
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int x, y, z, sum;
  printf("Enter three integers: ");
  scanf("%d %d %d", &x, &y, &z);
  sum = x + y + z;
  printf("sum =  %d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
add    0x14(%rsp),%esi
add    0xc(%rsp),%esi
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Enter three integers: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [11 x i8] c"sum = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Enter three integers: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [11 x i8] c"sum = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, %9
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret i32 0
}
int hostapd_wps_cancel(struct hostapd_data *hapd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
define i32 @hostapd_wps_cancel(%struct.hostapd_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(const char *arg) {
  printf("%s [IP ADDRESS | HOSTNAME]\n", arg);
  printf("This program obtains the /index.html of the address given.\n");
  printf("Supports IPv4, IPv6, and DNS resolution\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"%s [IP ADDRESS | HOSTNAME]\0A\00"
@.str.1 = [60 x i8] c"This program obtains the /index.html of the address given.\0A\00"
@.str.2 = [41 x i8] c"Supports IPv4, IPv6, and DNS resolution\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [28 x i8] c"%s [IP ADDRESS | HOSTNAME]\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [59 x i8] c"This program obtains the /index.html of the address given.\00"
@str.3 = [40 x i8] c"Supports IPv4, IPv6, and DNS resolution\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.3, i64 0, i64 0))
%5 = load i32, i32* @EXIT_SUCCESS
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
int strncmp(char const *, char const *, size_t);
int lwm2m_strncmp(const char *s1, const char *s2, size_t n) {
  return strncmp(s1, s2, n);
}


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

x86 assembly (clang, -O2):
<lwm2m_strncmp>:
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
define i32 @lwm2m_strncmp(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ hfuzz_trace_cmp1_internal(uintptr_t, int /*<<< orphan*/,
                                             int /*<<< orphan*/);
void hfuzz_trace_cmp1(uintptr_t pc, uint8_t Arg1, uint8_t Arg2) {
  hfuzz_trace_cmp1_internal(pc, Arg1, Arg2);
}


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

x86 assembly (clang, -O2):
<hfuzz_trace_cmp1>:
jmp    1030 <hfuzz_trace_cmp1_internal@plt>

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

LLVM IR (-O2):
define void @hfuzz_trace_cmp1(i64 %0, i32 %1, i32 %2) {
%4 = tail call i32 @hfuzz_trace_cmp1_internal(i64 %0, i32 %1, i32 %2)
ret void
}
void handle_CHLD(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_CHLD(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_LengthSquaredVec3_init(void) {
  _hmt_register_covercase("HMM_LengthSquaredVec3", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_LengthSquaredVec3_init>:
lea    0xee9(%rip),%rdi
lea    0xef8(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"HMM_LengthSquaredVec3\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_LengthSquaredVec3_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int snprintf(char *, int, char *, unsigned long long);
int uwsgi_long2str2n(unsigned long long num, char *ptr, int size) {
  int ret = snprintf(ptr, size, "%llu", num);
  if (ret < 0)
    return 0;
  return ret;
}


x86 assembly (clang, -O0):
<uwsgi_long2str2n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x10(%rbp),%rcx
lea    0xecb(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    1153 <uwsgi_long2str2n+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1159 <uwsgi_long2str2n+0x49>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_long2str2n>:
push   %rax
mov    %rdi,%rcx
lea    0xee5(%rip),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
call   1030 <snprintf@plt>
xor    %ecx,%ecx
test   %eax,%eax
cmovs  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
define i32 @uwsgi_long2str2n(i64 %0, i8* %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
ret i32 %6
}
foo(int x) { return x + 92; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x5c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x5c(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 92
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 92
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ const uint8_t;

/* Variables and functions */
const uint8_t *find_uint8_t(const uint8_t *it, const uint8_t *end,
                            uint8_t val) {
  while (it != end) {
    if (*it == val)
      return it;
    ++it;
  }
  return 0;
}


x86 assembly (clang, -O0):
<find_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     114d <find_uint8_t+0x4d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x20(%rbp),%rax
jne    113c <find_uint8_t+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <find_uint8_t+0x55>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <find_uint8_t+0x10>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_uint8_t>:
cmp    %rsi,%rdi
je     111e <find_uint8_t+0x1e>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
cmp    %rdx,(%rax)
je     1120 <find_uint8_t+0x20>
add    $0x8,%rax
cmp    %rsi,%rax
jne    1110 <find_uint8_t+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64* @find_uint8_t(i64* %0, i64* readnone %1, i64 %2) {
%4 = icmp eq i64* %0, %1
br i1 %4, label %12, label %5
5: ; preds = %3, %9
%6 = phi i64* [ %10, %9 ], [ %0, %3 ]
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, %2
br i1 %8, label %12, label %9
9: ; preds = %5
%10 = getelementptr inbounds i64, i64* %6, i64 1
%11 = icmp eq i64* %10, %1
br i1 %11, label %12, label %5
12: ; preds = %5, %9, %3
%13 = phi i64* [ null, %3 ], [ null, %9 ], [ %6, %5 ]
ret i64* %13
}
/* Variables and functions */
int sdb_do_log(int);
int sdb_error_log(int prio) { return sdb_do_log(prio); }


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

x86 assembly (clang, -O2):
<sdb_error_log>:
jmp    1030 <sdb_do_log@plt>

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

LLVM IR (-O2):
define i32 @sdb_error_log(i32 %0) {
%2 = tail call i32 @sdb_do_log(i32 %0)
ret i32 %2
}
/* Variables and functions */
int ioctl(int, int, int);
int om_touchscreen_lock(int fd) { return ioctl(fd, 0x40044590, 1); }


x86 assembly (clang, -O0):
<om_touchscreen_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x40044590,%esi
mov    $0x1,%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_touchscreen_lock>:
mov    $0x40044590,%esi
mov    $0x1,%edx
jmp    1030 <ioctl@plt>

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

LLVM IR (-O2):
define i32 @om_touchscreen_lock(i32 %0) {
%2 = tail call i32 @ioctl(i32 %0, i32 1074021776, i32 1)
ret i32 %2
}
int fn5(int a, int b, int m) { return (b & m) | (a & ~m); }


x86 assembly (clang, -O0):
<fn5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn5>:
mov    %esi,%eax
xor    %edi,%eax
and    %edx,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fn5(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* %5
%8 = load i32, i32* %6
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @fn5(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %1
%5 = xor i32 %2, -1
%6 = and i32 %5, %0
%7 = or i32 %4, %6
ret i32 %7
}
int lfs2_rambd_sync(const struct lfs2_config *cfg) {
  ;
  (void)cfg;
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.lfs2_config = type opaque
define i32 @lfs2_rambd_sync(%struct.lfs2_config* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int sqrt(int);
double EDasin(double x) { return (1. / sqrt(1. - x * x)); }


x86 assembly (clang, -O0):
<EDasin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe9d(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EDasin>:
push   %rax
mulsd  %xmm0,%xmm0
movsd  0xee3(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <sqrt@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xec7(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @EDasin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fneg double %3
%6 = call double @llvm.fmuladd.f64(double %5, double %4, double 1.000000e+00)
%7 = fptosi double %6 to i32
%8 = call i32 @sqrt(i32 %7)
%9 = sitofp i32 %8 to double
%10 = fdiv double 1.000000e+00, %9
ret double %10
}

LLVM IR (-O2):
define double @EDasin(double %0) {
%2 = fneg double %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%4 = fptosi double %3 to i32
%5 = tail call i32 @sqrt(i32 %4)
%6 = sitofp i32 %5 to double
%7 = fdiv double 1.000000e+00, %6
ret double %7
}
void tests_config_reader_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @tests_config_reader_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int listen(int, int);
int /*<<< orphan*/ perror(char *);
extern int Listen(int s, int backlog) {
  int result;
  if ((result = listen(s, backlog)) < 0) {
    perror("listen error");
    exit(3);
  }
  return result;
}


x86 assembly (clang, -O0):
<Listen>:
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 <listen@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    116b <Listen+0x3b>
lea    0xea4(%rip),%rdi
call   1040 <perror@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Listen>:
push   %rax
call   1030 <listen@plt>
test   %eax,%eax
js     113c <Listen+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    $0x3,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"listen error\00"
define i32 @Listen(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 = load i32, i32* %4
%8 = call i32 @listen(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 3)
unreachable
13: ; preds = %2
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
@.str = [13 x i8] c"listen error\00"
define i32 @Listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 3)
unreachable
8: ; preds = %2
ret i32 %3
}
short test_39_2(short *mem) { return __atomic_fetch_add(mem + 0, 1, 4); }


x86 assembly (clang, -O0):
<test_39_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%ax
lock xadd %ax,(%rcx)
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_39_2>:
mov    $0x1,%ax
lock xadd %ax,(%rdi)
ret

LLVM IR (-O0):
define signext i16 @test_39_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 0
store i16 1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw add i16* %6, i16 %7 acq_rel
store i16 %8, i16* %4
%9 = load i16, i16* %4
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @test_39_2(i16* nocapture %0) {
%2 = atomicrmw add i16* %0, i16 1 acq_rel
ret i16 %2
}
/* Variables and functions */
int getLength(char *);
int TabbingColumnPosition(int n, int total) {
  int colWidth = getLength("textwidth") / total;
  return colWidth * (n + 1);
}


x86 assembly (clang, -O0):
<TabbingColumnPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <getLength@plt>
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TabbingColumnPosition>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
call   1030 <getLength@plt>
cltd
idiv   %ebx
add    $0x1,%ebp
imul   %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"textwidth\00"
define i32 @TabbingColumnPosition(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @getLength(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
%12 = mul nsw i32 %9, %11
ret i32 %12
}

LLVM IR (-O2):
@.str = [10 x i8] c"textwidth\00"
define i32 @TabbingColumnPosition(i32 %0, i32 %1) {
%3 = tail call i32 @getLength(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = sdiv i32 %3, %1
%5 = add nsw i32 %0, 1
%6 = mul nsw i32 %4, %5
ret i32 %6
}
void foreground(int colour) { colour = colour; }


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

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

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

LLVM IR (-O2):
define void @foreground(i32 %0) {
ret void
}
unsigned int index_for(unsigned int tablelength, unsigned int hashvalue) {
  return (hashvalue % tablelength);
}


x86 assembly (clang, -O0):
<index_for>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0x4(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_for>:
mov    %esi,%eax
xor    %edx,%edx
div    %edi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @index_for(i32 %0, i32 %1) {
%3 = urem i32 %1, %0
ret i32 %3
}
int op_logor(int a, int b) { return a || b; }


x86 assembly (clang, -O0):
<op_logor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1123 <op_logor+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_logor>:
xor    %eax,%eax
or     %esi,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @op_logor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @op_logor(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
scalar_t__ randlcgSimple_increment(int *);
scalar_t__ randlcgc_increment(int *);
uint64_t randCombined_increment(uint64_t *SeedBCN_z_k, uint64_t *SeedLCG_z_k) {
  return (int64_t)(randlcgSimple_increment(SeedLCG_z_k) -
                   randlcgc_increment(SeedBCN_z_k)) &
         0x7FFFFFFFull;
}


x86 assembly (clang, -O0):
<randCombined_increment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <randlcgSimple_increment@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <randlcgc_increment@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
cltq
and    $0x7fffffff,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randCombined_increment>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <randlcgSimple_increment@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <randlcgc_increment@plt>
sub    %eax,%ebx
and    $0x7fffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @randCombined_increment(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = call i64 @randlcgSimple_increment(i32* %5)
%7 = load i32*, i32** %3
%8 = call i64 @randlcgc_increment(i32* %7)
%9 = sub nsw i64 %6, %8
%10 = trunc i64 %9 to i32
%11 = sext i32 %10 to i64
%12 = and i64 %11, 2147483647
%13 = trunc i64 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @randCombined_increment(i32* %0, i32* %1) {
%3 = tail call i64 @randlcgSimple_increment(i32* %1)
%4 = tail call i64 @randlcgc_increment(i32* %0)
%5 = sub nsw i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = and i32 %6, 2147483647
ret i32 %7
}
/* Variables and functions */
int rom_present(char *);
int mach64gx_available(void) {
  return rom_present(L"roms/video/mach64/bios.bin");
}


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

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

LLVM IR (-O0):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 109, i32 97, i32 99, i32 104, i32 54, i32 52, i32 47, i32 98, i32 105, i32 111, i32 115, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @mach64gx_available() {
%1 = call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [27 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 109, i32 97, i32 99, i32 104, i32 54, i32 52, i32 47, i32 98, i32 105, i32 111, i32 115, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @mach64gx_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([27 x i32]* @.str to i8*))
ret i32 %1
}
void destroy_sharing_ptr(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @destroy_sharing_ptr(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_to_sr(char *);
void i_eori_sr(void) { op_to_sr("xor"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"xor\00"
define void @i_eori_sr() {
%1 = tail call i32 @op_to_sr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void ff_hevc_put_hevc_uni_qpel_v24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v24_8_sse4() {
ret void
}
int test(void *foo, int val) { return (*(int (*)(int))foo)(val); }


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

x86 assembly (clang, -O2):
<test>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @test(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32 (i32)*
%4 = tail call i32 %3(i32 %1)
ret i32 %4
}
void dsi_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @dsi_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void WARNING(const char *msg) { fprintf(stderr, "%s\n", msg); }


x86 assembly (clang, -O0):
<WARNING>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WARNING>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @WARNING(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void OSHalt() {
  while (1) {
    __asm__("cli;hlt");
  }
}


x86 assembly (clang, -O0):
<OSHalt>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <OSHalt+0x9>
cli
hlt
jmp    1109 <OSHalt+0x9>

x86 assembly (clang, -O2):
<OSHalt>:
cli
hlt
jmp    1100 <OSHalt>

LLVM IR (-O0):
define void @OSHalt() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @OSHalt() {
br label %1
1: ; preds = %0, %1
tail call void asm sideeffect "cli;hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %1
}