#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 sqrtf(float);
void __vsqrtf(float *x, float *y, long count, long stridex, long stridey) {
  long i;
  float u;
  float z;
  float result;
  for (i = 0; i < count; i++) {
    u = z = *x;
    result = sqrtf(u);
    *y = result;
    x += stridex;
    y += stridey;
  }
}


x86 assembly (clang, -O0):
<__vsqrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    11a1 <__vsqrtf+0x91>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
call   1030 <sqrtf@plt>
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x28(%rbp),%rax
shl    $0x2,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1134 <__vsqrtf+0x24>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__vsqrtf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
test   %rdx,%rdx
jle    12b9 <__vsqrtf+0x1a9>
mov    %r8,%r15
mov    %rcx,%r14
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%r12
lea    -0x1(%rdx),%rax
mov    %r13d,%ebp
and    $0x3,%ebp
cmp    $0x3,%rax
jb     127a <__vsqrtf+0x16a>
and    $0xfffffffffffffffc,%r13
mov    %r14,%rax
shl    $0x4,%rax
mov    %rax,0x18(%rsp)
mov    %r15,%rax
shl    $0x4,%rax
mov    %rax,0x10(%rsp)
mov    %r14,0x20(%rsp)
lea    0x0(,%r14,4),%r14
mov    %r15,0x28(%rsp)
lea    0x0(,%r15,4),%r15
xorps  %xmm1,%xmm1
jmp    11b1 <__vsqrtf+0xa1>
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <sqrtf@plt>
xorps  %xmm1,%xmm1
movss  %xmm0,(%rbx,%r15,1)
add    %r15,%rbx
add    %r14,%r12
add    %r15,%rbx
add    $0xfffffffffffffffc,%r13
je     125c <__vsqrtf+0x14c>
mov    %rbx,0x8(%rsp)
mov    %r12,%rbx
movss  (%r12),%xmm0
ucomiss %xmm1,%xmm0
jb     11d0 <__vsqrtf+0xc0>
sqrtss %xmm0,%xmm0
jmp    11d8 <__vsqrtf+0xc8>
nopw   0x0(%rax,%rax,1)
call   1030 <sqrtf@plt>
xorps  %xmm1,%xmm1
mov    0x8(%rsp),%rax
movss  %xmm0,(%rax)
lea    (%rbx,%r14,1),%r12
movss  (%rbx,%r14,1),%xmm0
ucomiss %xmm1,%xmm0
mov    %rbx,0x30(%rsp)
jb     1200 <__vsqrtf+0xf0>
sqrtss %xmm0,%xmm0
jmp    1208 <__vsqrtf+0xf8>
nopl   0x0(%rax,%rax,1)
call   1030 <sqrtf@plt>
xorps  %xmm1,%xmm1
mov    0x8(%rsp),%rax
lea    (%rax,%r15,1),%rbx
movss  %xmm0,(%rax,%r15,1)
movss  (%r12,%r14,1),%xmm0
add    %r14,%r12
ucomiss %xmm1,%xmm0
jb     1230 <__vsqrtf+0x120>
sqrtss %xmm0,%xmm0
jmp    1238 <__vsqrtf+0x128>
nopl   0x0(%rax,%rax,1)
call   1030 <sqrtf@plt>
xorps  %xmm1,%xmm1
movss  %xmm0,(%rbx,%r15,1)
add    %r15,%rbx
movss  (%r12,%r14,1),%xmm0
add    %r14,%r12
ucomiss %xmm1,%xmm0
jb     1190 <__vsqrtf+0x80>
sqrtss %xmm0,%xmm0
jmp    1198 <__vsqrtf+0x88>
mov    0x30(%rsp),%r12
add    0x18(%rsp),%r12
mov    0x8(%rsp),%rbx
add    0x10(%rsp),%rbx
mov    0x28(%rsp),%r15
mov    0x20(%rsp),%r14
test   %rbp,%rbp
je     12b9 <__vsqrtf+0x1a9>
shl    $0x2,%r14
shl    $0x2,%r15
xorps  %xmm1,%xmm1
jmp    12a8 <__vsqrtf+0x198>
nopl   0x0(%rax)
call   1030 <sqrtf@plt>
xorps  %xmm1,%xmm1
movss  %xmm0,(%rbx)
add    %r14,%r12
add    %r15,%rbx
add    $0xffffffffffffffff,%rbp
je     12b9 <__vsqrtf+0x1a9>
movss  (%r12),%xmm0
ucomiss %xmm1,%xmm0
jb     1290 <__vsqrtf+0x180>
sqrtss %xmm0,%xmm0
jmp    1298 <__vsqrtf+0x188>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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