#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 */
float powf(float const, float const);
void vec_pow(long N, float *dst, const float *src1, const float *src2) {
  for (long i = 0; i < N; i++)
    dst[i] = powf(src1[i], src2[i]);
}


x86 assembly (clang, -O0):
<vec_pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    117b <vec_pow+0x6b>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
call   1030 <powf@plt>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1130 <vec_pow+0x20>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_pow>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
jle    11f0 <vec_pow+0xe0>
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
lea    -0x1(%rdi),%rax
mov    %r12d,%r13d
and    $0x3,%r13d
cmp    $0x3,%rax
jae    1145 <vec_pow+0x35>
xor    %ebp,%ebp
jmp    11ba <vec_pow+0xaa>
and    $0xfffffffffffffffc,%r12
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movss  (%r15,%rbp,4),%xmm0
movss  (%r14,%rbp,4),%xmm1
call   1030 <powf@plt>
movss  %xmm0,(%rbx,%rbp,4)
movss  0x4(%r15,%rbp,4),%xmm0
movss  0x4(%r14,%rbp,4),%xmm1
call   1030 <powf@plt>
movss  %xmm0,0x4(%rbx,%rbp,4)
movss  0x8(%r15,%rbp,4),%xmm0
movss  0x8(%r14,%rbp,4),%xmm1
call   1030 <powf@plt>
movss  %xmm0,0x8(%rbx,%rbp,4)
movss  0xc(%r15,%rbp,4),%xmm0
movss  0xc(%r14,%rbp,4),%xmm1
call   1030 <powf@plt>
movss  %xmm0,0xc(%rbx,%rbp,4)
add    $0x4,%rbp
cmp    %rbp,%r12
jne    1150 <vec_pow+0x40>
test   %r13,%r13
je     11f0 <vec_pow+0xe0>
lea    (%rbx,%rbp,4),%r12
lea    (%r14,%rbp,4),%r14
lea    (%r15,%rbp,4),%rbp
xor    %ebx,%ebx
nopl   (%rax)
movss  0x0(%rbp,%rbx,4),%xmm0
movss  (%r14,%rbx,4),%xmm1
call   1030 <powf@plt>
movss  %xmm0,(%r12,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    11d0 <vec_pow+0xc0>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @vec_pow(i64 %0, float* %1, float* %2, float* %3) {
%5 = alloca i64
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca i64
store i64 %0, i64* %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
store i64 0, i64* %9
br label %10
10: ; preds = %27, %4
%11 = load i64, i64* %9
%12 = load i64, i64* %5
%13 = icmp slt i64 %11, %12
br i1 %13, label %14, label %30
14: ; preds = %10
%15 = load float*, float** %7
%16 = load i64, i64* %9
%17 = getelementptr inbounds float, float* %15, i64 %16
%18 = load float, float* %17
%19 = load float*, float** %8
%20 = load i64, i64* %9
%21 = getelementptr inbounds float, float* %19, i64 %20
%22 = load float, float* %21
%23 = call float @powf(float %18, float %22)
%24 = load float*, float** %6
%25 = load i64, i64* %9
%26 = getelementptr inbounds float, float* %24, i64 %25
store float %23, float* %26
br label %27
27: ; preds = %14
%28 = load i64, i64* %9
%29 = add nsw i64 %28, 1
store i64 %29, i64* %9
br label %10
30: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @vec_pow(i64 %0, float* nocapture writeonly %1, float* nocapture %2, float* nocapture %3) {
%5 = icmp sgt i64 %0, 0
br i1 %5, label %6, label %27
6: ; preds = %4
%7 = add i64 %0, -1
%8 = and i64 %0, 3
%9 = icmp ult i64 %7, 3
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = and i64 %0, -4
br label %28
12: ; preds = %28, %6
%13 = phi i64 [ 0, %6 ], [ %58, %28 ]
%14 = icmp eq i64 %8, 0
br i1 %14, label %27, label %15
15: ; preds = %12, %15
%16 = phi i64 [ %24, %15 ], [ %13, %12 ]
%17 = phi i64 [ %25, %15 ], [ 0, %12 ]
%18 = getelementptr inbounds float, float* %2, i64 %16
%19 = load float, float* %18
%20 = getelementptr inbounds float, float* %3, i64 %16
%21 = load float, float* %20
%22 = tail call float @powf(float %19, float %21)
%23 = getelementptr inbounds float, float* %1, i64 %16
store float %22, float* %23
%24 = add nuw nsw i64 %16, 1
%25 = add i64 %17, 1
%26 = icmp eq i64 %25, %8
br i1 %26, label %27, label %15
27: ; preds = %12, %15, %4
ret void
28: ; preds = %28, %10
%29 = phi i64 [ 0, %10 ], [ %58, %28 ]
%30 = phi i64 [ 0, %10 ], [ %59, %28 ]
%31 = getelementptr inbounds float, float* %2, i64 %29
%32 = load float, float* %31
%33 = getelementptr inbounds float, float* %3, i64 %29
%34 = load float, float* %33
%35 = tail call float @powf(float %32, float %34)
%36 = getelementptr inbounds float, float* %1, i64 %29
store float %35, float* %36
%37 = or i64 %29, 1
%38 = getelementptr inbounds float, float* %2, i64 %37
%39 = load float, float* %38
%40 = getelementptr inbounds float, float* %3, i64 %37
%41 = load float, float* %40
%42 = tail call float @powf(float %39, float %41)
%43 = getelementptr inbounds float, float* %1, i64 %37
store float %42, float* %43
%44 = or i64 %29, 2
%45 = getelementptr inbounds float, float* %2, i64 %44
%46 = load float, float* %45
%47 = getelementptr inbounds float, float* %3, i64 %44
%48 = load float, float* %47
%49 = tail call float @powf(float %46, float %48)
%50 = getelementptr inbounds float, float* %1, i64 %44
store float %49, float* %50
%51 = or i64 %29, 3
%52 = getelementptr inbounds float, float* %2, i64 %51
%53 = load float, float* %52
%54 = getelementptr inbounds float, float* %3, i64 %51
%55 = load float, float* %54
%56 = tail call float @powf(float %53, float %55)
%57 = getelementptr inbounds float, float* %1, i64 %51
store float %56, float* %57
%58 = add nuw nsw i64 %29, 4
%59 = add i64 %30, 4
%60 = icmp eq i64 %59, %11
br i1 %60, label %12, label %28
}