#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ abort();
__attribute__((no)) void bar(double *pa, double *pb, double *pc) {
  int i;
  for (i = 0; i < 256; i++) {
    if (pa[i] != (pb[i] * pc[i]))
      abort();
  }
  return;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x100,-0x1c(%rbp)
jge    118e <bar+0x7e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
ucomisd %xmm1,%xmm0
jne    1174 <bar+0x64>
jp     1174 <bar+0x64>
jmp    117b <bar+0x6b>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1180 <bar+0x70>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <bar+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rdi,%rax,8),%xmm0
movsd  (%rsi,%rax,8),%xmm1
mulsd  (%rdx,%rax,8),%xmm1
ucomisd %xmm1,%xmm0
jne    115f <bar+0x4f>
jp     115f <bar+0x4f>
movsd  0x8(%rdi,%rax,8),%xmm0
movsd  0x8(%rsi,%rax,8),%xmm1
mulsd  0x8(%rdx,%rax,8),%xmm1
ucomisd %xmm1,%xmm0
jne    115f <bar+0x4f>
jp     115f <bar+0x4f>
add    $0x2,%rax
cmp    $0x100,%rax
jne    1120 <bar+0x10>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @bar(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
store i32 0, i32* %7
br label %8
8: ; preds = %32, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 256
br i1 %10, label %11, label %35
11: ; preds = %8
%12 = load double*, double** %4
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
%16 = load double, double* %15
%17 = load double*, double** %5
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %17, i64 %19
%21 = load double, double* %20
%22 = load double*, double** %6
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
%26 = load double, double* %25
%27 = fmul double %21, %26
%28 = fcmp une double %16, %27
br i1 %28, label %29, label %31
29: ; preds = %11
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %11
br label %32
32: ; preds = %31
%33 = load i32, i32* %7
%34 = add nsw i32 %33, 1
store i32 %34, i32* %7
br label %8
35: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @bar(double* nocapture %0, double* nocapture %1, double* nocapture %2) {
br label %17
4: ; preds = %17
%5 = or i64 %18, 1
%6 = getelementptr inbounds double, double* %0, i64 %5
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 %5
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %2, i64 %5
%11 = load double, double* %10
%12 = fmul double %9, %11
%13 = fcmp une double %7, %12
br i1 %13, label %27, label %14
14: ; preds = %4
%15 = add nuw nsw i64 %18, 2
%16 = icmp eq i64 %15, 256
br i1 %16, label %29, label %17
17: ; preds = %14, %3
%18 = phi i64 [ 0, %3 ], [ %15, %14 ]
%19 = getelementptr inbounds double, double* %0, i64 %18
%20 = load double, double* %19
%21 = getelementptr inbounds double, double* %1, i64 %18
%22 = load double, double* %21
%23 = getelementptr inbounds double, double* %2, i64 %18
%24 = load double, double* %23
%25 = fmul double %22, %24
%26 = fcmp une double %20, %25
br i1 %26, label %27, label %4
27: ; preds = %4, %17
%28 = tail call i32 (...) @abort()
unreachable
29: ; preds = %14
ret void
}