#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*/ exp(int /*<<< orphan*/);
void MYVEXP(int *n, double *x, int *stridex, double *y, int *stridey) {
  double *x_endp = x + (*n);
  while (x != x_endp) {
    *y++ = exp(*x++);
  }
}


x86 assembly (clang, -O0):
<MYVEXP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq (%rcx),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x30(%rbp),%rax
je     1184 <MYVEXP+0x74>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cvttsd2si (%rax),%edi
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,(%rax)
jmp    1142 <MYVEXP+0x32>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MYVEXP>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
movslq (%rdi),%r12
test   %r12,%r12
je     1151 <MYVEXP+0x41>
mov    %rcx,%r14
mov    %rsi,%r15
shl    $0x3,%r12
xor    %ebx,%ebx
nopl   0x0(%rax)
cvttsd2si (%r15,%rbx,1),%edi
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r14,%rbx,1)
add    $0x8,%rbx
cmp    %rbx,%r12
jne    1130 <MYVEXP+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @MYVEXP(i32* nocapture %0, double* %1, i32* nocapture readnone %2, double* nocapture writeonly %3, i32* nocapture readnone %4) {
%6 = load i32, i32* %0
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds double, double* %1, i64 %7
%9 = icmp eq i32 %6, 0
br i1 %9, label %20, label %10
10: ; preds = %5, %10
%11 = phi double* [ %13, %10 ], [ %1, %5 ]
%12 = phi double* [ %18, %10 ], [ %3, %5 ]
%13 = getelementptr inbounds double, double* %11, i64 1
%14 = load double, double* %11
%15 = fptosi double %14 to i32
%16 = tail call i32 @exp(i32 %15)
%17 = sitofp i32 %16 to double
%18 = getelementptr inbounds double, double* %12, i64 1
store double %17, double* %12
%19 = icmp eq double* %13, %8
br i1 %19, label %20, label %10
20: ; preds = %10, %5
ret void
}