#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*/ bar(double *, double *, double *, double *);
__attribute__((no)) int main1(int n, double *__restrict__ pd,
                              double *__restrict__ pa, double *__restrict__ pb,
                              double *__restrict__ pc) {
  int i;
  for (i = 0; i < n; i++) {
    pa[i] = pb[i] * pc[i];
    pd[i] = 5.0;
  }
  bar(pd, pa, pb, pc);
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1188 <main1+0x78>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1132 <main1+0x22>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
push   %rax
mov    %rsi,%r11
test   %edi,%edi
jle    125d <main1+0x14d>
mov    %edi,%r9d
cmp    $0x4,%edi
jae    112b <main1+0x1b>
xor    %edi,%edi
jmp    1229 <main1+0x119>
mov    %r9d,%edi
and    $0xfffffffc,%edi
lea    -0x4(%rdi),%rax
mov    %rax,%r10
shr    $0x2,%r10
add    $0x1,%r10
test   %rax,%rax
je     1272 <main1+0x162>
mov    %r10,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %eax,%eax
movapd 0xea6(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movupd (%rcx,%rax,8),%xmm1
movupd 0x10(%rcx,%rax,8),%xmm2
movupd (%r8,%rax,8),%xmm3
mulpd  %xmm1,%xmm3
movupd 0x10(%r8,%rax,8),%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm3,(%rdx,%rax,8)
movupd %xmm1,0x10(%rdx,%rax,8)
movupd %xmm0,(%r11,%rax,8)
movupd %xmm0,0x10(%r11,%rax,8)
movupd 0x20(%rcx,%rax,8),%xmm1
movupd 0x30(%rcx,%rax,8),%xmm2
movupd 0x20(%r8,%rax,8),%xmm3
mulpd  %xmm1,%xmm3
movupd 0x30(%r8,%rax,8),%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm3,0x20(%rdx,%rax,8)
movupd %xmm1,0x30(%rdx,%rax,8)
movupd %xmm0,0x20(%r11,%rax,8)
movupd %xmm0,0x30(%r11,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rsi
jne    1160 <main1+0x50>
test   $0x1,%r10b
je     1224 <main1+0x114>
movupd (%rcx,%rax,8),%xmm0
movupd 0x10(%rcx,%rax,8),%xmm1
movupd (%r8,%rax,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%r8,%rax,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%rdx,%rax,8)
movupd %xmm0,0x10(%rdx,%rax,8)
movapd 0xde9(%rip),%xmm0
movupd %xmm0,(%r11,%rax,8)
movupd %xmm0,0x10(%r11,%rax,8)
cmp    %r9,%rdi
je     125d <main1+0x14d>
movabs $0x4014000000000000,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rcx,%rdi,8),%xmm0
mulsd  (%r8,%rdi,8),%xmm0
movsd  %xmm0,(%rdx,%rdi,8)
mov    %rax,(%r11,%rdi,8)
add    $0x1,%rdi
cmp    %rdi,%r9
jne    1240 <main1+0x130>
mov    %r11,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
test   $0x1,%r10b
jne    11e4 <main1+0xd4>
jmp    1224 <main1+0x114>

LLVM IR (-O0):
define i32 @main1(i32 %0, double* noalias %1, double* noalias %2, double* noalias %3, double* noalias %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
store i32 %0, i32* %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
store i32 0, i32* %11
br label %12
12: ; preds = %36, %5
%13 = load i32, i32* %11
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %39
16: ; preds = %12
%17 = load double*, double** %9
%18 = load i32, i32* %11
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %17, i64 %19
%21 = load double, double* %20
%22 = load double*, double** %10
%23 = load i32, i32* %11
%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 = load double*, double** %8
%29 = load i32, i32* %11
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
store double %27, double* %31
%32 = load double*, double** %7
%33 = load i32, i32* %11
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %32, i64 %34
store double 5.000000e+00, double* %35
br label %36
36: ; preds = %16
%37 = load i32, i32* %11
%38 = add nsw i32 %37, 1
store i32 %38, i32* %11
br label %12
39: ; preds = %12
%40 = load double*, double** %7
%41 = load double*, double** %8
%42 = load double*, double** %9
%43 = load double*, double** %10
%44 = call i32 @bar(double* %40, double* %41, double* %42, double* %43)
ret i32 0
}

LLVM IR (-O2):
define i32 @main1(i32 %0, double* noalias %1, double* noalias %2, double* noalias %3, double* noalias %4) {
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %111
7: ; preds = %5
%8 = zext i32 %0 to i64
%9 = icmp ult i32 %0, 4
br i1 %9, label %98, label %10
10: ; preds = %7
%11 = and i64 %8, 4294967292
%12 = add nsw i64 %11, -4
%13 = lshr exact i64 %12, 2
%14 = add nuw nsw i64 %13, 1
%15 = and i64 %14, 1
%16 = icmp eq i64 %12, 0
br i1 %16, label %70, label %17
17: ; preds = %10
%18 = and i64 %14, 9223372036854775806
br label %19
19: ; preds = %19, %17
%20 = phi i64 [ 0, %17 ], [ %67, %19 ]
%21 = phi i64 [ 0, %17 ], [ %68, %19 ]
%22 = getelementptr inbounds double, double* %3, i64 %20
%23 = bitcast double* %22 to <2 x double>*
%24 = load <2 x double>, <2 x double>* %23
%25 = getelementptr inbounds double, double* %22, i64 2
%26 = bitcast double* %25 to <2 x double>*
%27 = load <2 x double>, <2 x double>* %26
%28 = getelementptr inbounds double, double* %4, i64 %20
%29 = bitcast double* %28 to <2 x double>*
%30 = load <2 x double>, <2 x double>* %29
%31 = getelementptr inbounds double, double* %28, i64 2
%32 = bitcast double* %31 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = fmul <2 x double> %24, %30
%35 = fmul <2 x double> %27, %33
%36 = getelementptr inbounds double, double* %2, i64 %20
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> %34, <2 x double>* %37
%38 = getelementptr inbounds double, double* %36, i64 2
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> %35, <2 x double>* %39
%40 = getelementptr inbounds double, double* %1, i64 %20
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.000000e+00>, <2 x double>* %41
%42 = getelementptr inbounds double, double* %40, i64 2
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.000000e+00>, <2 x double>* %43
%44 = or i64 %20, 4
%45 = getelementptr inbounds double, double* %3, i64 %44
%46 = bitcast double* %45 to <2 x double>*
%47 = load <2 x double>, <2 x double>* %46
%48 = getelementptr inbounds double, double* %45, i64 2
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = getelementptr inbounds double, double* %4, i64 %44
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = getelementptr inbounds double, double* %51, i64 2
%55 = bitcast double* %54 to <2 x double>*
%56 = load <2 x double>, <2 x double>* %55
%57 = fmul <2 x double> %47, %53
%58 = fmul <2 x double> %50, %56
%59 = getelementptr inbounds double, double* %2, i64 %44
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %57, <2 x double>* %60
%61 = getelementptr inbounds double, double* %59, i64 2
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> %58, <2 x double>* %62
%63 = getelementptr inbounds double, double* %1, i64 %44
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.000000e+00>, <2 x double>* %64
%65 = getelementptr inbounds double, double* %63, i64 2
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.000000e+00>, <2 x double>* %66
%67 = add nuw i64 %20, 8
%68 = add i64 %21, 2
%69 = icmp eq i64 %68, %18
br i1 %69, label %70, label %19
70: ; preds = %19, %10
%71 = phi i64 [ 0, %10 ], [ %67, %19 ]
%72 = icmp eq i64 %15, 0
br i1 %72, label %96, label %73
73: ; preds = %70
%74 = getelementptr inbounds double, double* %3, i64 %71
%75 = bitcast double* %74 to <2 x double>*
%76 = load <2 x double>, <2 x double>* %75
%77 = getelementptr inbounds double, double* %74, i64 2
%78 = bitcast double* %77 to <2 x double>*
%79 = load <2 x double>, <2 x double>* %78
%80 = getelementptr inbounds double, double* %4, i64 %71
%81 = bitcast double* %80 to <2 x double>*
%82 = load <2 x double>, <2 x double>* %81
%83 = getelementptr inbounds double, double* %80, i64 2
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = fmul <2 x double> %76, %82
%87 = fmul <2 x double> %79, %85
%88 = getelementptr inbounds double, double* %2, i64 %71
%89 = bitcast double* %88 to <2 x double>*
store <2 x double> %86, <2 x double>* %89
%90 = getelementptr inbounds double, double* %88, i64 2
%91 = bitcast double* %90 to <2 x double>*
store <2 x double> %87, <2 x double>* %91
%92 = getelementptr inbounds double, double* %1, i64 %71
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.000000e+00>, <2 x double>* %93
%94 = getelementptr inbounds double, double* %92, i64 2
%95 = bitcast double* %94 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 5.000000e+00>, <2 x double>* %95
br label %96
96: ; preds = %70, %73
%97 = icmp eq i64 %11, %8
br i1 %97, label %111, label %98
98: ; preds = %7, %96
%99 = phi i64 [ 0, %7 ], [ %11, %96 ]
br label %100
100: ; preds = %98, %100
%101 = phi i64 [ %109, %100 ], [ %99, %98 ]
%102 = getelementptr inbounds double, double* %3, i64 %101
%103 = load double, double* %102
%104 = getelementptr inbounds double, double* %4, i64 %101
%105 = load double, double* %104
%106 = fmul double %103, %105
%107 = getelementptr inbounds double, double* %2, i64 %101
store double %106, double* %107
%108 = getelementptr inbounds double, double* %1, i64 %101
store double 5.000000e+00, double* %108
%109 = add nuw nsw i64 %101, 1
%110 = icmp eq i64 %109, %8
br i1 %110, label %111, label %100
111: ; preds = %100, %96, %5
%112 = tail call i32 @bar(double* %1, double* %2, double* %3, double* %4)
ret i32 0
}