#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 *pd, double *pa, double *pb, double *pc) {
  int i;
  for (i = 0; i < 256; i++) {
    if (pa[i] != (pb[i] * pc[i]))
      abort();
    if (pd[i] != 5.0)
      abort();
  }
  return;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x100,-0x24(%rbp)
jge    11c3 <bar+0xb3>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
ucomisd %xmm1,%xmm0
jne    1178 <bar+0x68>
jp     1178 <bar+0x68>
jmp    117f <bar+0x6f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xe6c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11a9 <bar+0x99>
jp     11a9 <bar+0x99>
jmp    11b0 <bar+0xa0>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11b5 <bar+0xa5>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112f <bar+0x1f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %eax,%eax
movsd  0xee5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rax,8),%xmm1
movsd  (%rdx,%rax,8),%xmm2
mulsd  (%rcx,%rax,8),%xmm2
ucomisd %xmm2,%xmm1
jne    117a <bar+0x6a>
jp     117a <bar+0x6a>
movsd  (%rdi,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jne    117a <bar+0x6a>
jp     117a <bar+0x6a>
movsd  0x8(%rsi,%rax,8),%xmm1
movsd  0x8(%rdx,%rax,8),%xmm2
mulsd  0x8(%rcx,%rax,8),%xmm2
ucomisd %xmm2,%xmm1
jne    117a <bar+0x6a>
jp     117a <bar+0x6a>
movsd  0x8(%rdi,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jne    117a <bar+0x6a>
jp     117a <bar+0x6a>
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, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
br label %10
10: ; preds = %43, %4
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 256
br i1 %12, label %13, label %46
13: ; preds = %10
%14 = load double*, double** %6
%15 = load i32, i32* %9
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %14, i64 %16
%18 = load double, double* %17
%19 = load double*, double** %7
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %19, i64 %21
%23 = load double, double* %22
%24 = load double*, double** %8
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
%28 = load double, double* %27
%29 = fmul double %23, %28
%30 = fcmp une double %18, %29
br i1 %30, label %31, label %33
31: ; preds = %13
%32 = call i32 (...) @abort()
unreachable
33: ; preds = %13
%34 = load double*, double** %5
%35 = load i32, i32* %9
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
%38 = load double, double* %37
%39 = fcmp une double %38, 5.000000e+00
br i1 %39, label %40, label %42
40: ; preds = %33
%41 = call i32 (...) @abort()
unreachable
42: ; preds = %33
br label %43
43: ; preds = %42
%44 = load i32, i32* %9
%45 = add nsw i32 %44, 1
store i32 %45, i32* %9
br label %10
46: ; preds = %10
ret void
}

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