#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *);
void finput(double xmin, double xmax, double ymin, double ymax, double vxd,
            double vyd, int xn, int Yn, int ITs, int ITv, int ITw) {
  FILE *fp;
  int i, j, NAP, NNP, N[2];
  int I[xn], J[Yn], NI[xn], NJ[Yn];
  float T;
  float Dx, Dy;
  double x, y;
  float F(float x, float y, int Ind);
  float vx(float v, float x, float y, int Ind);
  float vy(float v, float x, float y, int Ind);
  void IWF(FILE * fp, int xn, int Yn, double xmin, double ymin, float Dx,
           float Dy, float vxd, float vyd, int ITs, int ITv, int ITw, int N[2]);
  Dx = (xmax - xmin) / (xn - 1);
  Dy = (ymax - ymin) / (Yn - 1);
  fp = fopen("Data/inputD.dat", "w");
  y = ymin;
  for (j = 0; j < Yn; j++, y += Dy) {
    x = xmin;
    for (i = 0; i < xn; i++, x += Dx)
      fprintf(fp, "%f %f %f\n", F(x, y, ITs), vx(vxd, x, y, ITv),
              vy(vyd, x, y, ITv));
  }
  IWF(fp, xn, Yn, xmin, ymin, Dx, Dy, vxd, vyd, ITs, ITv, ITw, N);
  fclose(fp);
  NAP = N[0];
  NNP = N[1];
  fp = fopen("Data/inputN.dat", "w");
  fprintf(fp, "%d %d %d %d\n", xn, Yn, NAP, NNP);
  fprintf(fp, "%f %f\n", Dx, Dy);
  fclose(fp);
  printf("Initial condition is generated successfully\n");
  fp = fopen("Data/F.dat", "w");
  y = ymin;
  for (j = 0; j < Yn; j++, y += Dy) {
    x = xmin;
    for (i = 0; i < xn; i++, x += Dx)
      fprintf(fp, "%f ", F(x, y, ITs));
    fprintf(fp, "\n");
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<finput>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %edi,-0x34(%rbp)
mov    %esi,-0x38(%rbp)
mov    %edx,-0x3c(%rbp)
mov    %ecx,-0x40(%rbp)
mov    %r8d,-0x44(%rbp)
mov    -0x34(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rax,-0x78(%rbp)
mov    -0x38(%rbp),%eax
mov    %rax,-0x80(%rbp)
mov    -0x34(%rbp),%eax
mov    %rax,-0x88(%rbp)
mov    -0x38(%rbp),%eax
mov    %rax,-0x90(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x38(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x9c(%rbp)
ff
lea    0xdcf(%rip),%rdi
lea    0xdd8(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    139b <finput+0x21b>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    136c <finput+0x1ec>
mov    -0x50(%rbp),%rax
mov    %rax,-0xc8(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movsd  -0xb0(%rbp),%xmm1
ff
cvtsd2ss %xmm1,%xmm1
mov    -0x3c(%rbp),%edi
call   1040 <F@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
cvtsd2ss %xmm1,%xmm1
movsd  -0xb0(%rbp),%xmm2
ff
cvtsd2ss %xmm2,%xmm2
mov    -0x40(%rbp),%edi
call   1030 <vx@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
cvtsd2ss %xmm1,%xmm1
movsd  -0xb0(%rbp),%xmm2
ff
cvtsd2ss %xmm2,%xmm2
mov    -0x40(%rbp),%edi
call   1090 <vy@plt>
mov    -0xc8(%rbp),%rdi
movsd  -0xc0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xb8(%rbp),%xmm0
ff
cvtss2sd %xmm2,%xmm2
lea    0xcd7(%rip),%rsi
mov    $0x3,%al
call   1080 <fprintf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
movss  -0x98(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1275 <finput+0xf5>
jmp    1371 <finput+0x1f1>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
movss  -0x9c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1255 <finput+0xd5>
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movss  -0x98(%rbp),%xmm2
ff
movss  -0x9c(%rbp),%xmm3
ff
movsd  -0x28(%rbp),%xmm4
cvtsd2ss %xmm4,%xmm4
movsd  -0x30(%rbp),%xmm5
cvtsd2ss %xmm5,%xmm5
mov    -0x3c(%rbp),%ecx
mov    -0x40(%rbp),%r8d
mov    -0x44(%rbp),%r9d
lea    -0x68(%rbp),%rax
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1060 <IWF@plt>
add    $0x10,%rsp
mov    -0x50(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x68(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x60(%rbp)
lea    0xc0f(%rip),%rdi
lea    0xbfc(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x5c(%rbp),%r8d
mov    -0x60(%rbp),%r9d
lea    0xbf6(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x50(%rbp),%rdi
movss  -0x98(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x9c(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
lea    0xbb5(%rip),%rsi
mov    $0x2,%al
call   1080 <fprintf@plt>
mov    -0x50(%rbp),%rdi
call   1050 <fclose@plt>
lea    0xbc2(%rip),%rdi
call   1070 <printf@plt>
lea    0xbe3(%rip),%rdi
lea    0xb86(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    157d <finput+0x3fd>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1541 <finput+0x3c1>
mov    -0x50(%rbp),%rax
mov    %rax,-0xd0(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movsd  -0xb0(%rbp),%xmm1
ff
cvtsd2ss %xmm1,%xmm1
mov    -0x3c(%rbp),%edi
call   1040 <F@plt>
mov    -0xd0(%rbp),%rdi
cvtss2sd %xmm0,%xmm0
lea    0xb61(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
movss  -0x98(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    14c7 <finput+0x347>
mov    -0x50(%rbp),%rdi
lea    0xaeb(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
movss  -0x9c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    14a7 <finput+0x327>
mov    -0x50(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x70(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finput>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r8d,%r15d
mov    %ecx,%ebp
mov    %edx,%r13d
mov    %esi,%r12d
movsd  %xmm5,0x10(%rsp)
movsd  %xmm4,0x20(%rsp)
movapd %xmm2,0x40(%rsp)
mov    %rsp,0xa8(%rsp)
unpcklpd %xmm1,%xmm3
mov    %edi,0x1c(%rsp)
movd   %edi,%xmm4
movd   %esi,%xmm1
punpckldq %xmm4,%xmm1
pcmpeqd %xmm4,%xmm4
paddd  %xmm1,%xmm4
movapd %xmm2,%xmm1
movapd %xmm0,0x80(%rsp)
unpcklpd %xmm0,%xmm1
cvtdq2pd %xmm4,%xmm0
subpd  %xmm1,%xmm3
divpd  %xmm0,%xmm3
cvtpd2ps %xmm3,%xmm0
movapd %xmm0,0x70(%rsp)
lea    0xdf0(%rip),%rdi
lea    0xdf9(%rip),%rsi
call   10b0 <fopen@plt>
movaps 0x40(%rsp),%xmm2
mov    %rax,%rbx
test   %r12d,%r12d
jle    13b5 <finput+0x225>
mov    %r15d,0x38(%rsp)
movsd  0x20(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2c(%rsp)
movsd  0x10(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
cvtps2pd 0x70(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
xor    %r14d,%r14d
lea    0xda3(%rip),%r15
movsd  %xmm2,0x30(%rsp)
mov    %r12d,0x3c(%rsp)
movapd %xmm1,0xc0(%rsp)
jmp    12b4 <finput+0x124>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r14d
movsd  0x30(%rsp),%xmm0
addsd  0x60(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
mov    0x3c(%rsp),%r12d
cmp    %r12d,%r14d
je     1398 <finput+0x208>
cmpl   $0x0,0x1c(%rsp)
jle    1290 <finput+0x100>
movsd  0x30(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x10(%rsp)
mov    0x1c(%rsp),%r12d
movaps 0x80(%rsp),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,0x90(%rsp)
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x20(%rsp)
movss  0x10(%rsp),%xmm1
mov    %r13d,%edi
call   1050 <F@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0xb8(%rsp)
movss  0x2c(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
mov    %ebp,%edi
call   1030 <vx@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0xb0(%rsp)
movss  0x28(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
mov    %ebp,%edi
call   10a0 <vy@plt>
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mov    %rbx,%rdi
mov    %r15,%rsi
movsd  0xb8(%rsp),%xmm0
movsd  0xb0(%rsp),%xmm1
mov    $0x3,%al
call   1090 <fprintf@plt>
movsd  0x90(%rsp),%xmm0
movapd 0xc0(%rsp),%xmm1
addsd  %xmm1,%xmm0
add    $0xffffffff,%r12d
jne    12e0 <finput+0x150>
jmp    1290 <finput+0x100>
movaps 0x40(%rsp),%xmm1
mov    0x38(%rsp),%r15d
movaps 0x70(%rsp),%xmm3
movss  0x2c(%rsp),%xmm4
movss  0x28(%rsp),%xmm5
jmp    13e0 <finput+0x250>
movsd  0x20(%rsp),%xmm0
xorps  %xmm4,%xmm4
cvtsd2ss %xmm0,%xmm4
movsd  0x10(%rsp),%xmm0
xorps  %xmm5,%xmm5
cvtsd2ss %xmm0,%xmm5
movaps 0x70(%rsp),%xmm3
cvtps2pd %xmm3,%xmm0
movapd %xmm0,0x60(%rsp)
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
shufps $0x55,%xmm3,%xmm2
lea    0x58(%rsp),%rax
mov    %rax,(%rsp)
mov    %rbx,%rdi
mov    0x1c(%rsp),%r14d
mov    %r14d,%esi
mov    %r12d,%edx
movaps 0x80(%rsp),%xmm0
mov    %r13d,%ecx
mov    %ebp,%r8d
mov    %r15d,%r9d
call   1070 <IWF@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    0x58(%rsp),%ebp
mov    0x5c(%rsp),%eax
mov    %eax,0x10(%rsp)
lea    0xbed(%rip),%rdi
lea    0xbda(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0xbe7(%rip),%rsi
xor    %r15d,%r15d
mov    %rax,%rdi
mov    %r14d,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    0x10(%rsp),%r9d
xor    %eax,%eax
call   1090 <fprintf@plt>
movapd 0x60(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
lea    0xba0(%rip),%rsi
mov    %rbx,%rdi
movapd %xmm0,0x90(%rsp)
mov    $0x2,%al
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
lea    0xbb1(%rip),%rdi
call   1040 <puts@plt>
lea    0xb96(%rip),%rdi
lea    0xb66(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
test   %r12d,%r12d
jle    156c <finput+0x3dc>
lea    0xb82(%rip),%r14
jmp    14fc <finput+0x36c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
mov    %rbx,%rsi
call   1080 <fputc@plt>
add    $0x1,%r15d
movapd 0x40(%rsp),%xmm0
movapd 0x60(%rsp),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm0,0x40(%rsp)
cmp    %r12d,%r15d
je     156c <finput+0x3dc>
cmpl   $0x0,0x1c(%rsp)
jle    14d0 <finput+0x340>
movaps 0x40(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x20(%rsp)
mov    0x1c(%rsp),%ebp
movaps 0x80(%rsp),%xmm0
xchg   %ax,%ax
movsd  %xmm0,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0x20(%rsp),%xmm1
mov    %r13d,%edi
call   1050 <F@plt>
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
movsd  0x10(%rsp),%xmm0
movapd 0x90(%rsp),%xmm1
addsd  %xmm1,%xmm0
add    $0xffffffff,%ebp
jne    1520 <finput+0x390>
jmp    14d0 <finput+0x340>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    0xa8(%rsp),%rsp
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Data/inputD.dat\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [10 x i8] c"%f %f %f\0A\00"
@.str.3 = [16 x i8] c"Data/inputN.dat\00"
@.str.4 = [13 x i8] c"%d %d %d %d\0A\00"
@.str.5 = [7 x i8] c"%f %f\0A\00"
@.str.6 = [45 x i8] c"Initial condition is generated successfully\0A\00"
@.str.7 = [11 x i8] c"Data/F.dat\00"
@.str.8 = [4 x i8] c"%f \00"
@.str.9 = [2 x i8] c"\0A\00"
define void @finput(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10) {
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32*
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca [2 x i32]
%29 = alloca i8*
%30 = alloca i64
%31 = alloca i64
%32 = alloca i64
%33 = alloca i64
%34 = alloca float
%35 = alloca float
%36 = alloca float
%37 = alloca double
%38 = alloca double
store double %0, double* %12
store double %1, double* %13
store double %2, double* %14
store double %3, double* %15
store double %4, double* %16
store double %5, double* %17
store i32 %6, i32* %18
store i32 %7, i32* %19
store i32 %8, i32* %20
store i32 %9, i32* %21
store i32 %10, i32* %22
%39 = load i32, i32* %18
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %29
%42 = alloca i32, i64 %40
store i64 %40, i64* %30
%43 = load i32, i32* %19
%44 = zext i32 %43 to i64
%45 = alloca i32, i64 %44
store i64 %44, i64* %31
%46 = load i32, i32* %18
%47 = zext i32 %46 to i64
%48 = alloca i32, i64 %47
store i64 %47, i64* %32
%49 = load i32, i32* %19
%50 = zext i32 %49 to i64
%51 = alloca i32, i64 %50
store i64 %50, i64* %33
%52 = load double, double* %13
%53 = load double, double* %12
%54 = fsub double %52, %53
%55 = load i32, i32* %18
%56 = sub nsw i32 %55, 1
%57 = sitofp i32 %56 to double
%58 = fdiv double %54, %57
%59 = fptrunc double %58 to float
store float %59, float* %35
%60 = load double, double* %15
%61 = load double, double* %14
%62 = fsub double %60, %61
%63 = load i32, i32* %19
%64 = sub nsw i32 %63, 1
%65 = sitofp i32 %64 to double
%66 = fdiv double %62, %65
%67 = fptrunc double %66 to float
store float %67, float* %36
%68 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %68, i32** %23
%69 = load double, double* %14
store double %69, double* %38
store i32 0, i32* %25
br label %70
70: ; preds = %116, %11
%71 = load i32, i32* %25
%72 = load i32, i32* %19
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %123
74: ; preds = %70
%75 = load double, double* %12
store double %75, double* %37
store i32 0, i32* %24
br label %76
76: ; preds = %108, %74
%77 = load i32, i32* %24
%78 = load i32, i32* %18
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %115
80: ; preds = %76
%81 = load i32*, i32** %23
%82 = load double, double* %37
%83 = fptrunc double %82 to float
%84 = load double, double* %38
%85 = fptrunc double %84 to float
%86 = load i32, i32* %20
%87 = call float @F(float %83, float %85, i32 %86)
%88 = fpext float %87 to double
%89 = load double, double* %16
%90 = fptrunc double %89 to float
%91 = load double, double* %37
%92 = fptrunc double %91 to float
%93 = load double, double* %38
%94 = fptrunc double %93 to float
%95 = load i32, i32* %21
%96 = call float @vx(float %90, float %92, float %94, i32 %95)
%97 = fpext float %96 to double
%98 = load double, double* %17
%99 = fptrunc double %98 to float
%100 = load double, double* %37
%101 = fptrunc double %100 to float
%102 = load double, double* %38
%103 = fptrunc double %102 to float
%104 = load i32, i32* %21
%105 = call float @vy(float %99, float %101, float %103, i32 %104)
%106 = fpext float %105 to double
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %88, double %97, double %106)
br label %108
108: ; preds = %80
%109 = load i32, i32* %24
%110 = add nsw i32 %109, 1
store i32 %110, i32* %24
%111 = load float, float* %35
%112 = fpext float %111 to double
%113 = load double, double* %37
%114 = fadd double %113, %112
store double %114, double* %37
br label %76
115: ; preds = %76
br label %116
116: ; preds = %115
%117 = load i32, i32* %25
%118 = add nsw i32 %117, 1
store i32 %118, i32* %25
%119 = load float, float* %36
%120 = fpext float %119 to double
%121 = load double, double* %38
%122 = fadd double %121, %120
store double %122, double* %38
br label %70
123: ; preds = %70
%124 = load i32*, i32** %23
%125 = load i32, i32* %18
%126 = load i32, i32* %19
%127 = load double, double* %12
%128 = load double, double* %14
%129 = load float, float* %35
%130 = load float, float* %36
%131 = load double, double* %16
%132 = fptrunc double %131 to float
%133 = load double, double* %17
%134 = fptrunc double %133 to float
%135 = load i32, i32* %20
%136 = load i32, i32* %21
%137 = load i32, i32* %22
%138 = getelementptr inbounds [2 x i32], [2 x i32]* %28, i64 0, i64 0
%139 = load i32*, i32** %23
%140 = call i32 @fclose(i32* %139)
%141 = getelementptr inbounds [2 x i32], [2 x i32]* %28, i64 0, i64 0
%142 = load i32, i32* %141
store i32 %142, i32* %26
%143 = getelementptr inbounds [2 x i32], [2 x i32]* %28, i64 0, i64 1
%144 = load i32, i32* %143
store i32 %144, i32* %27
%145 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %145, i32** %23
%146 = load i32*, i32** %23
%147 = load i32, i32* %18
%148 = load i32, i32* %19
%149 = load i32, i32* %26
%150 = load i32, i32* %27
%151 = call i32 (i32*, i8*, ...) @fprintf(i32* %146, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %147, i32 %148, i32 %149, i32 %150)
%152 = load i32*, i32** %23
%153 = load float, float* %35
%154 = fpext float %153 to double
%155 = load float, float* %36
%156 = fpext float %155 to double
%157 = call i32 (i32*, i8*, ...) @fprintf(i32* %152, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %154, double %156)
%158 = load i32*, i32** %23
%159 = call i32 @fclose(i32* %158)
%160 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%161 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %161, i32** %23
%162 = load double, double* %14
store double %162, double* %38
store i32 0, i32* %25
br label %163
163: ; preds = %193, %123
%164 = load i32, i32* %25
%165 = load i32, i32* %19
%166 = icmp slt i32 %164, %165
br i1 %166, label %167, label %200
167: ; preds = %163
%168 = load double, double* %12
store double %168, double* %37
store i32 0, i32* %24
br label %169
169: ; preds = %183, %167
%170 = load i32, i32* %24
%171 = load i32, i32* %18
%172 = icmp slt i32 %170, %171
br i1 %172, label %173, label %190
173: ; preds = %169
%174 = load i32*, i32** %23
%175 = load double, double* %37
%176 = fptrunc double %175 to float
%177 = load double, double* %38
%178 = fptrunc double %177 to float
%179 = load i32, i32* %20
%180 = call float @F(float %176, float %178, i32 %179)
%181 = fpext float %180 to double
%182 = call i32 (i32*, i8*, ...) @fprintf(i32* %174, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), double %181)
br label %183
183: ; preds = %173
%184 = load i32, i32* %24
%185 = add nsw i32 %184, 1
store i32 %185, i32* %24
%186 = load float, float* %35
%187 = fpext float %186 to double
%188 = load double, double* %37
%189 = fadd double %188, %187
store double %189, double* %37
br label %169
190: ; preds = %169
%191 = load i32*, i32** %23
%192 = call i32 (i32*, i8*, ...) @fprintf(i32* %191, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %193
193: ; preds = %190
%194 = load i32, i32* %25
%195 = add nsw i32 %194, 1
store i32 %195, i32* %25
%196 = load float, float* %36
%197 = fpext float %196 to double
%198 = load double, double* %38
%199 = fadd double %198, %197
store double %199, double* %38
br label %163
200: ; preds = %163
%201 = load i32*, i32** %23
%202 = call i32 @fclose(i32* %201)
%203 = load i8*, i8** %29
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Data/inputD.dat\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [10 x i8] c"%f %f %f\0A\00"
@.str.3 = [16 x i8] c"Data/inputN.dat\00"
@.str.4 = [13 x i8] c"%d %d %d %d\0A\00"
@.str.5 = [7 x i8] c"%f %f\0A\00"
@.str.7 = [11 x i8] c"Data/F.dat\00"
@.str.8 = [4 x i8] c"%f \00"
@str = [44 x i8] c"Initial condition is generated successfully\00"
define void @finput(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10) {
%12 = alloca [2 x i32]
%13 = bitcast [2 x i32]* %12 to i8*
%14 = tail call i8* @llvm.stacksave()
%15 = insertelement <2 x double> poison, double %3, i64 0
%16 = insertelement <2 x double> %15, double %1, i64 1
%17 = insertelement <2 x double> poison, double %2, i64 0
%18 = insertelement <2 x double> %17, double %0, i64 1
%19 = fsub <2 x double> %16, %18
%20 = insertelement <2 x i32> poison, i32 %7, i64 0
%21 = insertelement <2 x i32> %20, i32 %6, i64 1
%22 = add nsw <2 x i32> %21, <i32 -1, i32 -1>
%23 = sitofp <2 x i32> %22 to <2 x double>
%24 = fdiv <2 x double> %19, %23
%25 = fptrunc <2 x double> %24 to <2 x float>
%26 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp sgt i32 %7, 0
br i1 %27, label %32, label %28
28: ; preds = %11
%29 = fptrunc double %4 to float
%30 = fptrunc double %5 to float
%31 = fpext <2 x float> %25 to <2 x double>
br label %62
32: ; preds = %11
%33 = icmp sgt i32 %6, 0
%34 = fptrunc double %4 to float
%35 = fptrunc double %5 to float
%36 = fpext <2 x float> %25 to <2 x double>
%37 = extractelement <2 x double> %36, i64 1
%38 = extractelement <2 x double> %36, i64 0
br label %39
39: ; preds = %32, %58
%40 = phi double [ %2, %32 ], [ %60, %58 ]
%41 = phi i32 [ 0, %32 ], [ %59, %58 ]
br i1 %33, label %42, label %58
42: ; preds = %39
%43 = fptrunc double %40 to float
br label %44
44: ; preds = %42, %44
%45 = phi double [ %0, %42 ], [ %56, %44 ]
%46 = phi i32 [ 0, %42 ], [ %55, %44 ]
%47 = fptrunc double %45 to float
%48 = tail call float @F(float %47, float %43, i32 %8)
%49 = fpext float %48 to double
%50 = tail call float @vx(float %34, float %47, float %43, i32 %9)
%51 = fpext float %50 to double
%52 = tail call float @vy(float %35, float %47, float %43, i32 %9)
%53 = fpext float %52 to double
%54 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %49, double %51, double %53)
%55 = add nuw nsw i32 %46, 1
%56 = fadd double %45, %37
%57 = icmp eq i32 %55, %6
br i1 %57, label %58, label %44
58: ; preds = %44, %39
%59 = add nuw nsw i32 %41, 1
%60 = fadd double %40, %38
%61 = icmp eq i32 %59, %7
br i1 %61, label %62, label %39
62: ; preds = %58, %28
%63 = phi float [ %30, %28 ], [ %35, %58 ]
%64 = phi float [ %29, %28 ], [ %34, %58 ]
%65 = phi <2 x double> [ %31, %28 ], [ %36, %58 ]
%66 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%67 = extractelement <2 x float> %25, i64 0
%68 = extractelement <2 x float> %25, i64 1
%69 = call i32 @fclose(i32* %26)
%70 = load i32, i32* %66
%71 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 1
%72 = load i32, i32* %71
%73 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %6, i32 %7, i32 %70, i32 %72)
%75 = extractelement <2 x double> %65, i64 0
%76 = extractelement <2 x double> %65, i64 1
%77 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %76, double %75)
%78 = call i32 @fclose(i32* %73)
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%80 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br i1 %27, label %81, label %103
81: ; preds = %62
%82 = icmp sgt i32 %6, 0
br label %83
83: ; preds = %81, %98
%84 = phi double [ %2, %81 ], [ %101, %98 ]
%85 = phi i32 [ 0, %81 ], [ %100, %98 ]
br i1 %82, label %86, label %98
86: ; preds = %83
%87 = fptrunc double %84 to float
br label %88
88: ; preds = %86, %88
%89 = phi double [ %0, %86 ], [ %96, %88 ]
%90 = phi i32 [ 0, %86 ], [ %95, %88 ]
%91 = fptrunc double %89 to float
%92 = call float @F(float %91, float %87, i32 %8)
%93 = fpext float %92 to double
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), double %93)
%95 = add nuw nsw i32 %90, 1
%96 = fadd double %89, %76
%97 = icmp eq i32 %95, %6
br i1 %97, label %98, label %88
98: ; preds = %88, %83
%99 = call i32 @fputc(i32 10, i32* %80)
%100 = add nuw nsw i32 %85, 1
%101 = fadd double %84, %75
%102 = icmp eq i32 %100, %7
br i1 %102, label %103, label %83
103: ; preds = %98, %62
%104 = call i32 @fclose(i32* %80)
ret void
}