#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 */
double cos(float);
double fabsl(double);
double pow(float, int);
int /*<<< orphan*/ printf(char *, double, ...);
scalar_t__ sin(float);
double tan(double);
int x2pnts(double *, int, int);
int main() {
  double d = 0.0000001;
  double e_charge = 0.00000000000000000016021765;
  double e_mass = 0.00000000000000000000000000000091093819;
  double Plancks = 0.0000000000000000000000000000000006626068;
  double Coulomb = 0.00000000898755179;
  double pi = 3.14159265358979;
  double const_e = 2.71828182845905;
  double chargeratio = 0;
  double lambda = 0.00000000001;
  double energy = (1.5 * pow(10, -18) / (pow(lambda, 2)));
  double width = 4 * pow(10, -8);
  double thick = 14 * pow(10, -9);
  double wedgeangle = 0;
  double tilt = 0;
  double res = 1000;
  double eta = width / d;
  double vel = pow(2 * energy * e_charge / e_mass, 1 / 2);
  double alpha = wedgeangle * pi / 180;
  double beta = tilt * pi;
  double eta1 = .4;
  double eta2 = .4;
  double r0 = -4.04;
  double el0 = 0.000001;
  double w0 = 0.00003;
  double G1_z = 0.000001;
  double G2_z = 1;
  double G2_x = 0.00000005;
  double theta = 0;
  long double xmin;
  long double xmax;
  double zstart = -0.1;
  double zend = 2.1;
  double xstart = -200 * pow(10, -6);
  double xend = 200 * pow(10, -6);
  double ystart = -0.11 * pow(10, -3);
  double yend = 0.11 * pow(10, -3);
  double xpnts = 300;
  double ypnts = 300;
  double zpnts = 300;
  double zres = (zend - zstart) / zpnts;
  double w1;
  double r1;
  double el1;
  double el2;
  float fc;
  float ph;
  float ex;
  int j;
  double ReT[41][2] = {{0}};
  for (int i = 0; i <= 41; i++) {
    ReT[i][0] = i - 20;
  }
  double ImT[41][2] = {{0}};
  for (int i = 0; i <= 41; i++) {
    ImT[i][0] = i - 20;
  }
  if (beta >= 0) {
    xmin = width * (1 / res - cos(beta) / 2);
    if (beta <= alpha) {
      xmax = (width * cos(beta)) / 2 - width / res;
    } else {
      xmax = width * cos(beta) / 2 - width / res +
             thick * (tan(alpha) - tan(beta));
    }
  } else {
    xmax = (width * cos(beta) / 2) - width / res;
    if (fabsl(beta) <= alpha) {
      xmin = -((width * cos(beta)) / 2) + width / res;
    } else {
      xmin = -((width * cos(beta)) / 2) + width / res -
             thick * (tan(alpha) - tan(beta));
    }
  }
  for (int n = -20; n <= 20; n++) {
    for (ex = xmin; ex < xmax; ex += width / res) {
      fc = 2 * pi * n * ex / d;
      ph = -width * thick * chargeratio * pow(e_charge, 2) *
           (2 * pi * Coulomb / Plancks) /
           (vel * (.25 * pow(width, 2) - pow(ex, 2)));
      j = n + 20;
      ReT[j][1] += cos(ph + fc);
      ImT[j][1] += sin(ph + fc);
    }
  }
  for (int i = 0; i <= 40; i++) {
    ReT[i][1] = ReT[i][1] / res;
    ImT[i][1] = ImT[i][1] / res;
    printf("value of ReT is: %f and j is: %d \n", ReT[i][1], (i - 20));
  }
  for (int n = -5; n <= 5; n++) {
    int A;
    A = x2pnts((double *)ReT, 41, n);
    printf(" n, its index and result are : %d ", n);
    printf(",%d, ", A);
    printf("%f\n", ReT[A][1]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xf36(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xf21(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xf0c(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xef7(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movss  0xede(%rip),%xmm0
mov    $0xffffffee,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe71(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x718(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x718(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movss  0xe8e(%rip),%xmm0
mov    $0xfffffff8,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe19(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movss  0xe68(%rip),%xmm0
mov    $0xfffffff7,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xdeb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xdc2(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x60(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd9b(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
xor    %edi,%edi
call   10a0 <pow@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xd5f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xd31(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xd21(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xd09(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xce9(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xce1(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xcc9(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xcb1(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xc99(%rip),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xc76(%rip),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0xc5e(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movss  0xd0e(%rip),%xmm0
mov    $0xfffffffa,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xc31(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movss  0xce5(%rip),%xmm0
mov    $0xfffffffa,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xc00(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movss  0xcbc(%rip),%xmm0
mov    $0xfffffffd,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xbcf(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movss  0xc93(%rip),%xmm0
mov    $0xfffffffd,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xb9e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  0xb82(%rip),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0xb72(%rip),%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  0xb62(%rip),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
subsd  -0x118(%rbp),%xmm0
ff
divsd  -0x158(%rbp),%xmm0
ff
movsd  %xmm0,-0x160(%rbp)
ff
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x290,%edx
call   1050 <memset@plt>
movl   $0x0,-0x424(%rbp)
cmpl   $0x29,-0x424(%rbp)
jg     152a <main+0x3aa>
mov    -0x424(%rbp),%eax
sub    $0x14,%eax
cvtsi2sd %eax,%xmm0
movslq -0x424(%rbp),%rcx
lea    -0x420(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
jmp    14e3 <main+0x363>
lea    -0x6c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x290,%edx
call   1050 <memset@plt>
movl   $0x0,-0x6c4(%rbp)
cmpl   $0x29,-0x6c4(%rbp)
jg     158e <main+0x40e>
mov    -0x6c4(%rbp),%eax
sub    $0x14,%eax
cvtsi2sd %eax,%xmm0
movslq -0x6c4(%rbp),%rcx
lea    -0x6c0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x6c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c4(%rbp)
jmp    1547 <main+0x3c7>
movsd  -0xa0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1755 <main+0x5d5>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x720(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
movsd  0xa83(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x728(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
call   1080 <cos@plt>
movsd  -0x728(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x720(%rbp),%xmm0
ff
movsd  0xae3(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x6f8(%rbp)
ff
fldl   -0x6f8(%rbp)
fstpt  -0x100(%rbp)
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1693 <main+0x513>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x730(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x730(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xa0c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x708(%rbp)
ff
fldl   -0x708(%rbp)
fstpt  -0x110(%rbp)
jmp    1750 <main+0x5d0>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x750(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x750(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0x9a8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x740(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x738(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1070 <tan@plt>
movsd  %xmm0,-0x748(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1070 <tan@plt>
movsd  -0x748(%rbp),%xmm2
ff
movsd  -0x740(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x738(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x700(%rbp)
ff
fldl   -0x700(%rbp)
fstpt  -0x110(%rbp)
jmp    18f6 <main+0x776>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x758(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x758(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0x8e6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x6e0(%rbp)
ff
fldl   -0x6e0(%rbp)
fstpt  -0x110(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
call   1030 <fabsl@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1837 <main+0x6b7>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x760(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
call   1080 <cos@plt>
movsd  -0x760(%rbp),%xmm1
ff
mulsd  %xmm0,%xmm1
movsd  0x8d0(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x6f0(%rbp)
ff
fldl   -0x6f0(%rbp)
fstpt  -0x100(%rbp)
jmp    18f1 <main+0x771>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x780(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
call   1080 <cos@plt>
movsd  -0x780(%rbp),%xmm1
ff
mulsd  %xmm0,%xmm1
movsd  0x86f(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x768(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x770(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
call   1070 <tan@plt>
movsd  %xmm0,-0x778(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1070 <tan@plt>
movsd  -0x778(%rbp),%xmm2
ff
movsd  -0x770(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x768(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x6e8(%rbp)
ff
fldl   -0x6e8(%rbp)
fstpt  -0x100(%rbp)
jmp    18f6 <main+0x776>
movl   $0xffffffec,-0x6c8(%rbp)
ff ff ff
cmpl   $0x14,-0x6c8(%rbp)
jg     1b44 <main+0x9c4>
fldt   -0x100(%rbp)
fstps  -0x70c(%rbp)
movss  -0x70c(%rbp),%xmm0
ff
movss  %xmm0,-0x18c(%rbp)
ff
flds   -0x18c(%rbp)
fldt   -0x110(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jbe    1b2b <main+0x9ab>
jmp    1944 <main+0x7c4>
movsd  0x724(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
cvtsi2sdl -0x6c8(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movss  -0x18c(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x184(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x7a0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x7a0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0x69a(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x788(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x790(%rbp)
movsd  -0x60(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
movsd  %xmm0,-0x798(%rbp)
ff
movss  -0x18c(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10a0 <pow@plt>
movsd  -0x798(%rbp),%xmm2
ff
movsd  -0x790(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x788(%rbp),%xmm0
ff
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
movsd  0x678(%rip),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x188(%rbp)
ff
mov    -0x6c8(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x190(%rbp)
movss  -0x188(%rbp),%xmm0
ff
addss  -0x184(%rbp),%xmm0
ff
call   1080 <cos@plt>
movslq -0x190(%rbp),%rcx
lea    -0x420(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
movss  -0x188(%rbp),%xmm0
ff
addss  -0x184(%rbp),%xmm0
ff
call   1060 <sin@plt>
cvtsi2sd %rax,%xmm0
movslq -0x190(%rbp),%rcx
lea    -0x6c0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x60(%rbp),%xmm1
divsd  -0x80(%rbp),%xmm1
movss  -0x18c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18c(%rbp)
ff
jmp    1929 <main+0x7a9>
jmp    1b30 <main+0x9b0>
mov    -0x6c8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c8(%rbp)
jmp    1900 <main+0x780>
movl   $0x0,-0x6cc(%rbp)
cmpl   $0x28,-0x6cc(%rbp)
jg     1c12 <main+0xa92>
movslq -0x6cc(%rbp),%rcx
lea    -0x420(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
divsd  -0x80(%rbp),%xmm0
movslq -0x6cc(%rbp),%rcx
lea    -0x420(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
movslq -0x6cc(%rbp),%rcx
lea    -0x6c0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
divsd  -0x80(%rbp),%xmm0
movslq -0x6cc(%rbp),%rcx
lea    -0x6c0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
movslq -0x6cc(%rbp),%rcx
lea    -0x420(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    -0x6cc(%rbp),%esi
sub    $0x14,%esi
lea    0x4f5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x6cc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6cc(%rbp)
jmp    1b4e <main+0x9ce>
movl   $0xfffffffb,-0x6d0(%rbp)
ff ff ff
cmpl   $0x5,-0x6d0(%rbp)
jg     1cae <main+0xb2e>
lea    -0x420(%rbp),%rdi
mov    -0x6d0(%rbp),%edx
mov    $0x29,%esi
call   1090 <x2pnts@plt>
mov    %eax,-0x6d4(%rbp)
cvtsi2sdl -0x6d0(%rbp),%xmm0
ff
lea    0x4ba(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cvtsi2sdl -0x6d4(%rbp),%xmm0
ff
lea    0x4c7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movslq -0x6d4(%rbp),%rcx
lea    -0x420(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
lea    0x4a5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x6d0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6d0(%rbp)
jmp    1c1c <main+0xa9c>
xor    %eax,%eax
add    $0x7a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x5a8,%rsp
movss  0xe87(%rip),%xmm0
mov    $0xffffffee,%edi
call   1080 <pow@plt>
mulsd  0xe85(%rip),%xmm0
movsd  %xmm0,(%rsp)
movss  0xe6c(%rip),%xmm0
mov    $0x2,%edi
call   1080 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movss  0xe48(%rip),%xmm0
mov    $0xfffffff8,%edi
call   1080 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movss  0xe30(%rip),%xmm0
mov    $0xfffffff7,%edi
call   1080 <pow@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0xe27(%rip),%xmm0
divsd  0xe27(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
xor    %edi,%edi
call   1080 <pow@plt>
movsd  %xmm0,0x48(%rsp)
movss  0xdee(%rip),%xmm0
mov    $0xfffffffa,%edi
call   1080 <pow@plt>
movss  0xddc(%rip),%xmm0
mov    $0xfffffffa,%edi
call   1080 <pow@plt>
movss  0xdca(%rip),%xmm0
mov    $0xfffffffd,%edi
call   1080 <pow@plt>
movss  0xdb8(%rip),%xmm0
mov    $0xfffffffd,%edi
call   1080 <pow@plt>
lea    0x80(%rsp),%rdi
mov    $0x290,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    $0x20,%eax
mov    $0xffffffec,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x60(%rsp,%rax,1)
lea    0x1(%rcx),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x70(%rsp,%rax,1)
lea    0x2(%rcx),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x80(%rsp,%rax,1)
add    $0x30,%rax
add    $0x3,%ecx
cmp    $0x2c0,%rax
jne    1270 <main+0x110>
movsd  0x10(%rsp),%xmm0
mulsd  0xd6b(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0x310(%rsp),%rdi
mov    $0x290,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    $0x20,%eax
mov    $0xffffffec,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x2f0(%rsp,%rax,1)
lea    0x1(%rcx),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x300(%rsp,%rax,1)
lea    0x2(%rcx),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x310(%rsp,%rax,1)
add    $0x30,%rax
add    $0x3,%ecx
cmp    $0x2c0,%rax
jne    12f0 <main+0x190>
movsd  0x18(%rsp),%xmm0
mulsd  0xced(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
xorpd  %xmm0,%xmm0
call   1060 <cos@plt>
mulsd  0xcde(%rip),%xmm0
movsd  0xcde(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x20(%rsp)
xorpd  %xmm0,%xmm0
call   1060 <cos@plt>
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm0
mulsd  0xcab(%rip),%xmm0
movapd %xmm2,%xmm1
divsd  0xcaf(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x68(%rsp)
fldl   0x68(%rsp)
movsd  0x20(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2c(%rsp)
movss  %xmm0,0x3c(%rsp)
flds   0x3c(%rsp)
fstpt  0x74(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm0
mulsd  0xc79(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,0x30(%rsp)
mov    $0xffffffffffffffec,%r14
movsd  0xc67(%rip),%xmm2
movss  0xc07(%rip),%xmm0
movsd  %xmm1,0x40(%rsp)
fld    %st(0)
fstpt  (%rsp)
jmp    141e <main+0x2be>
xchg   %ax,%ax
add    $0x1,%r14
cmp    $0x15,%r14
je     1580 <main+0x420>
fldt   0x74(%rsp)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jbe    1410 <main+0x2b0>
fstp   %st(0)
xorps  %xmm3,%xmm3
cvtsi2sd %r14d,%xmm3
mulsd  0xc1c(%rip),%xmm3
movsd  %xmm3,0x50(%rsp)
mov    %r14,%rax
shl    $0x4,%rax
lea    (%rsp,%rax,1),%rbp
add    $0x1c8,%rbp
lea    (%rsp,%rax,1),%rbx
add    $0x458,%rbx
movss  0x2c(%rsp),%xmm4
fldz
nopw   0x0(%rax,%rax,1)
fstp   %st(0)
movss  %xmm4,0x34(%rsp)
xorps  %xmm3,%xmm3
cvtss2sd %xmm4,%xmm3
movsd  %xmm3,0x10(%rsp)
movsd  0x50(%rsp),%xmm1
mulsd  %xmm3,%xmm1
divsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x20(%rsp)
mov    $0x2,%edi
call   1080 <pow@plt>
mulsd  0x18(%rsp),%xmm0
mulsd  0xbb3(%rip),%xmm0
movsd  %xmm0,0x60(%rsp)
movss  0x30(%rsp),%xmm0
mov    $0x2,%edi
call   1080 <pow@plt>
movsd  %xmm0,0x58(%rsp)
movss  0x34(%rsp),%xmm0
mov    $0x2,%edi
call   1080 <pow@plt>
movsd  0x58(%rsp),%xmm1
mulsd  0xb81(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x48(%rsp),%xmm1
movsd  0x60(%rsp),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
addss  0x20(%rsp),%xmm0
movss  %xmm0,0x20(%rsp)
call   1060 <cos@plt>
addsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x0(%rbp)
movss  0x20(%rsp),%xmm0
call   1050 <sin@plt>
movss  0xad3(%rip),%xmm0
movsd  0xb23(%rip),%xmm2
movsd  0x40(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtsi2sd %rax,%xmm3
addsd  (%rbx),%xmm3
movsd  0x10(%rsp),%xmm4
addsd  %xmm1,%xmm4
cvtsd2ss %xmm4,%xmm4
movsd  %xmm3,(%rbx)
movss  %xmm4,0x38(%rsp)
flds   0x38(%rsp)
fldt   (%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldt   (%rsp)
ja     1470 <main+0x310>
jmp    1410 <main+0x2b0>
fstp   %st(0)
mov    $0xffffffec,%ebx
mov    $0x8,%ebp
lea    0xaf5(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x80(%rsp,%rbp,1),%xmm0
movsd  0xa97(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,0x80(%rsp,%rbp,1)
movsd  0x310(%rsp,%rbp,1),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x310(%rsp,%rbp,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x1,%ebx
add    $0x10,%rbp
cmp    $0x298,%rbp
jne    15a0 <main+0x440>
mov    $0xfffffffb,%ebx
movsd  0xa7b(%rip),%xmm0
movsd  %xmm0,(%rsp)
lea    0x80(%rsp),%r14
lea    0xa9a(%rip),%r15
lea    0xab6(%rip),%r12
lea    0xab5(%rip),%r13
nop
mov    %r14,%rdi
mov    $0x29,%esi
mov    %ebx,%edx
call   1070 <x2pnts@plt>
mov    %eax,%ebp
mov    %r15,%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movslq %ebp,%rax
shl    $0x4,%rax
movsd  0x88(%rsp,%rax,1),%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xa08(%rip),%xmm0
movsd  %xmm0,(%rsp)
add    $0x1,%ebx
cmp    $0x6,%ebx
jne    1620 <main+0x4c0>
xor    %eax,%eax
add    $0x5a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"value of ReT is: %f and j is: %d \0A\00"
@.str.1 = [35 x i8] c" n, its index and result are : %d \00"
@.str.2 = [6 x i8] c",%d, \00"
@.str.3 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca x86_fp80
%31 = alloca x86_fp80
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double
%45 = alloca double
%46 = alloca float
%47 = alloca float
%48 = alloca float
%49 = alloca i32
%50 = alloca [41 x [2 x double]]
%51 = alloca i32
%52 = alloca [41 x [2 x double]]
%53 = alloca i32
%54 = alloca i32
%55 = alloca i32
%56 = alloca i32
%57 = alloca i32
store i32 0, i32* %1
store double 0x3E7AD7F29ABCAF48, double* %2
store double 0x3C07A4DA07DED404, double* %3
store double 0x39B279DC8B6970AD, double* %4
store double 0x390B860B482CE8F1, double* %5
store double 0x3E434CF57723AB8B, double* %6
store double 0x400921FB54442D11, double* %7
store double 0x4005BF0A8B145774, double* %8
store double 0.000000e+00, double* %9
store double 0x3DA5FD7FE1796495, double* %10
%58 = call double @pow(float 1.000000e+01, i32 -18)
%59 = fmul double 1.500000e+00, %58
%60 = load double, double* %10
%61 = fptrunc double %60 to float
%62 = call double @pow(float %61, i32 2)
%63 = fdiv double %59, %62
store double %63, double* %11
%64 = call double @pow(float 1.000000e+01, i32 -8)
%65 = fmul double 4.000000e+00, %64
store double %65, double* %12
%66 = call double @pow(float 1.000000e+01, i32 -9)
%67 = fmul double 1.400000e+01, %66
store double %67, double* %13
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
store double 1.000000e+03, double* %16
%68 = load double, double* %12
%69 = load double, double* %2
%70 = fdiv double %68, %69
store double %70, double* %17
%71 = load double, double* %11
%72 = fmul double 2.000000e+00, %71
%73 = load double, double* %3
%74 = fmul double %72, %73
%75 = load double, double* %4
%76 = fdiv double %74, %75
%77 = fptrunc double %76 to float
%78 = call double @pow(float %77, i32 0)
store double %78, double* %18
%79 = load double, double* %14
%80 = load double, double* %7
%81 = fmul double %79, %80
%82 = fdiv double %81, 1.800000e+02
store double %82, double* %19
%83 = load double, double* %15
%84 = load double, double* %7
%85 = fmul double %83, %84
store double %85, double* %20
store double 4.000000e-01, double* %21
store double 4.000000e-01, double* %22
store double -4.040000e+00, double* %23
store double 0x3EB0C6F7A0B5ED8D, double* %24
store double 3.000000e-05, double* %25
store double 0x3EB0C6F7A0B5ED8D, double* %26
store double 1.000000e+00, double* %27
store double 5.000000e-08, double* %28
store double 0.000000e+00, double* %29
store double -1.000000e-01, double* %32
store double 2.100000e+00, double* %33
%86 = call double @pow(float 1.000000e+01, i32 -6)
%87 = fmul double -2.000000e+02, %86
store double %87, double* %34
%88 = call double @pow(float 1.000000e+01, i32 -6)
%89 = fmul double 2.000000e+02, %88
store double %89, double* %35
%90 = call double @pow(float 1.000000e+01, i32 -3)
%91 = fmul double -1.100000e-01, %90
store double %91, double* %36
%92 = call double @pow(float 1.000000e+01, i32 -3)
%93 = fmul double 1.100000e-01, %92
store double %93, double* %37
store double 3.000000e+02, double* %38
store double 3.000000e+02, double* %39
store double 3.000000e+02, double* %40
%94 = load double, double* %33
%95 = load double, double* %32
%96 = fsub double %94, %95
%97 = load double, double* %40
%98 = fdiv double %96, %97
store double %98, double* %41
%99 = bitcast [41 x [2 x double]]* %50 to i8*
store i32 0, i32* %51
br label %100
100: ; preds = %111, %0
%101 = load i32, i32* %51
%102 = icmp sle i32 %101, 41
br i1 %102, label %103, label %114
103: ; preds = %100
%104 = load i32, i32* %51
%105 = sub nsw i32 %104, 20
%106 = sitofp i32 %105 to double
%107 = load i32, i32* %51
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %50, i64 0, i64 %108
%110 = getelementptr inbounds [2 x double], [2 x double]* %109, i64 0, i64 0
store double %106, double* %110
br label %111
111: ; preds = %103
%112 = load i32, i32* %51
%113 = add nsw i32 %112, 1
store i32 %113, i32* %51
br label %100
114: ; preds = %100
%115 = bitcast [41 x [2 x double]]* %52 to i8*
store i32 0, i32* %53
br label %116
116: ; preds = %127, %114
%117 = load i32, i32* %53
%118 = icmp sle i32 %117, 41
br i1 %118, label %119, label %130
119: ; preds = %116
%120 = load i32, i32* %53
%121 = sub nsw i32 %120, 20
%122 = sitofp i32 %121 to double
%123 = load i32, i32* %53
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %52, i64 0, i64 %124
%126 = getelementptr inbounds [2 x double], [2 x double]* %125, i64 0, i64 0
store double %122, double* %126
br label %127
127: ; preds = %119
%128 = load i32, i32* %53
%129 = add nsw i32 %128, 1
store i32 %129, i32* %53
br label %116
130: ; preds = %116
%131 = load double, double* %20
%132 = fcmp oge double %131, 0.000000e+00
br i1 %132, label %133, label %179
133: ; preds = %130
%134 = load double, double* %12
%135 = load double, double* %16
%136 = fdiv double 1.000000e+00, %135
%137 = load double, double* %20
%138 = fptrunc double %137 to float
%139 = call double @cos(float %138)
%140 = fdiv double %139, 2.000000e+00
%141 = fsub double %136, %140
%142 = fmul double %134, %141
%143 = fpext double %142 to x86_fp80
store x86_fp80 %143, x86_fp80* %30
%144 = load double, double* %20
%145 = load double, double* %19
%146 = fcmp ole double %144, %145
br i1 %146, label %147, label %159
147: ; preds = %133
%148 = load double, double* %12
%149 = load double, double* %20
%150 = fptrunc double %149 to float
%151 = call double @cos(float %150)
%152 = fmul double %148, %151
%153 = fdiv double %152, 2.000000e+00
%154 = load double, double* %12
%155 = load double, double* %16
%156 = fdiv double %154, %155
%157 = fsub double %153, %156
%158 = fpext double %157 to x86_fp80
store x86_fp80 %158, x86_fp80* %31
br label %178
159: ; preds = %133
%160 = load double, double* %12
%161 = load double, double* %20
%162 = fptrunc double %161 to float
%163 = call double @cos(float %162)
%164 = fmul double %160, %163
%165 = fdiv double %164, 2.000000e+00
%166 = load double, double* %12
%167 = load double, double* %16
%168 = fdiv double %166, %167
%169 = fsub double %165, %168
%170 = load double, double* %13
%171 = load double, double* %19
%172 = call double @tan(double %171)
%173 = load double, double* %20
%174 = call double @tan(double %173)
%175 = fsub double %172, %174
%176 = call double @llvm.fmuladd.f64(double %170, double %175, double %169)
%177 = fpext double %176 to x86_fp80
store x86_fp80 %177, x86_fp80* %31
br label %178
178: ; preds = %159, %147
br label %230
179: ; preds = %130
%180 = load double, double* %12
%181 = load double, double* %20
%182 = fptrunc double %181 to float
%183 = call double @cos(float %182)
%184 = fmul double %180, %183
%185 = fdiv double %184, 2.000000e+00
%186 = load double, double* %12
%187 = load double, double* %16
%188 = fdiv double %186, %187
%189 = fsub double %185, %188
%190 = fpext double %189 to x86_fp80
store x86_fp80 %190, x86_fp80* %31
%191 = load double, double* %20
%192 = call double @fabsl(double %191)
%193 = load double, double* %19
%194 = fcmp ole double %192, %193
br i1 %194, label %195, label %208
195: ; preds = %179
%196 = load double, double* %12
%197 = load double, double* %20
%198 = fptrunc double %197 to float
%199 = call double @cos(float %198)
%200 = fmul double %196, %199
%201 = fdiv double %200, 2.000000e+00
%202 = fneg double %201
%203 = load double, double* %12
%204 = load double, double* %16
%205 = fdiv double %203, %204
%206 = fadd double %202, %205
%207 = fpext double %206 to x86_fp80
store x86_fp80 %207, x86_fp80* %30
br label %229
208: ; preds = %179
%209 = load double, double* %12
%210 = load double, double* %20
%211 = fptrunc double %210 to float
%212 = call double @cos(float %211)
%213 = fmul double %209, %212
%214 = fdiv double %213, 2.000000e+00
%215 = fneg double %214
%216 = load double, double* %12
%217 = load double, double* %16
%218 = fdiv double %216, %217
%219 = fadd double %215, %218
%220 = load double, double* %13
%221 = load double, double* %19
%222 = call double @tan(double %221)
%223 = load double, double* %20
%224 = call double @tan(double %223)
%225 = fsub double %222, %224
%226 = fneg double %220
%227 = call double @llvm.fmuladd.f64(double %226, double %225, double %219)
%228 = fpext double %227 to x86_fp80
store x86_fp80 %228, x86_fp80* %30
br label %229
229: ; preds = %208, %195
br label %230
230: ; preds = %229, %178
store i32 -20, i32* %54
br label %231
231: ; preds = %314, %230
%232 = load i32, i32* %54
%233 = icmp sle i32 %232, 20
br i1 %233, label %234, label %317
234: ; preds = %231
%235 = load x86_fp80, x86_fp80* %30
%236 = fptrunc x86_fp80 %235 to float
store float %236, float* %48
br label %237
237: ; preds = %305, %234
%238 = load float, float* %48
%239 = fpext float %238 to x86_fp80
%240 = load x86_fp80, x86_fp80* %31
%241 = fcmp olt x86_fp80 %239, %240
br i1 %241, label %242, label %313
242: ; preds = %237
%243 = load double, double* %7
%244 = fmul double 2.000000e+00, %243
%245 = load i32, i32* %54
%246 = sitofp i32 %245 to double
%247 = fmul double %244, %246
%248 = load float, float* %48
%249 = fpext float %248 to double
%250 = fmul double %247, %249
%251 = load double, double* %2
%252 = fdiv double %250, %251
%253 = fptrunc double %252 to float
store float %253, float* %46
%254 = load double, double* %12
%255 = fneg double %254
%256 = load double, double* %13
%257 = fmul double %255, %256
%258 = load double, double* %9
%259 = fmul double %257, %258
%260 = load double, double* %3
%261 = fptrunc double %260 to float
%262 = call double @pow(float %261, i32 2)
%263 = fmul double %259, %262
%264 = load double, double* %7
%265 = fmul double 2.000000e+00, %264
%266 = load double, double* %6
%267 = fmul double %265, %266
%268 = load double, double* %5
%269 = fdiv double %267, %268
%270 = fmul double %263, %269
%271 = load double, double* %18
%272 = load double, double* %12
%273 = fptrunc double %272 to float
%274 = call double @pow(float %273, i32 2)
%275 = load float, float* %48
%276 = call double @pow(float %275, i32 2)
%277 = fneg double %276
%278 = call double @llvm.fmuladd.f64(double 2.500000e-01, double %274, double %277)
%279 = fmul double %271, %278
%280 = fdiv double %270, %279
%281 = fptrunc double %280 to float
store float %281, float* %47
%282 = load i32, i32* %54
%283 = add nsw i32 %282, 20
store i32 %283, i32* %49
%284 = load float, float* %47
%285 = load float, float* %46
%286 = fadd float %284, %285
%287 = call double @cos(float %286)
%288 = load i32, i32* %49
%289 = sext i32 %288 to i64
%290 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %50, i64 0, i64 %289
%291 = getelementptr inbounds [2 x double], [2 x double]* %290, i64 0, i64 1
%292 = load double, double* %291
%293 = fadd double %292, %287
store double %293, double* %291
%294 = load float, float* %47
%295 = load float, float* %46
%296 = fadd float %294, %295
%297 = call i64 @sin(float %296)
%298 = sitofp i64 %297 to double
%299 = load i32, i32* %49
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %52, i64 0, i64 %300
%302 = getelementptr inbounds [2 x double], [2 x double]* %301, i64 0, i64 1
%303 = load double, double* %302
%304 = fadd double %303, %298
store double %304, double* %302
br label %305
305: ; preds = %242
%306 = load double, double* %12
%307 = load double, double* %16
%308 = fdiv double %306, %307
%309 = load float, float* %48
%310 = fpext float %309 to double
%311 = fadd double %310, %308
%312 = fptrunc double %311 to float
store float %312, float* %48
br label %237
313: ; preds = %237
br label %314
314: ; preds = %313
%315 = load i32, i32* %54
%316 = add nsw i32 %315, 1
store i32 %316, i32* %54
br label %231
317: ; preds = %231
store i32 0, i32* %55
br label %318
318: ; preds = %352, %317
%319 = load i32, i32* %55
%320 = icmp sle i32 %319, 40
br i1 %320, label %321, label %355
321: ; preds = %318
%322 = load i32, i32* %55
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %50, i64 0, i64 %323
%325 = getelementptr inbounds [2 x double], [2 x double]* %324, i64 0, i64 1
%326 = load double, double* %325
%327 = load double, double* %16
%328 = fdiv double %326, %327
%329 = load i32, i32* %55
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %50, i64 0, i64 %330
%332 = getelementptr inbounds [2 x double], [2 x double]* %331, i64 0, i64 1
store double %328, double* %332
%333 = load i32, i32* %55
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %52, i64 0, i64 %334
%336 = getelementptr inbounds [2 x double], [2 x double]* %335, i64 0, i64 1
%337 = load double, double* %336
%338 = load double, double* %16
%339 = fdiv double %337, %338
%340 = load i32, i32* %55
%341 = sext i32 %340 to i64
%342 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %52, i64 0, i64 %341
%343 = getelementptr inbounds [2 x double], [2 x double]* %342, i64 0, i64 1
store double %339, double* %343
%344 = load i32, i32* %55
%345 = sext i32 %344 to i64
%346 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %50, i64 0, i64 %345
%347 = getelementptr inbounds [2 x double], [2 x double]* %346, i64 0, i64 1
%348 = load double, double* %347
%349 = load i32, i32* %55
%350 = sub nsw i32 %349, 20
%351 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), double %348, i32 %350)
br label %352
352: ; preds = %321
%353 = load i32, i32* %55
%354 = add nsw i32 %353, 1
store i32 %354, i32* %55
br label %318
355: ; preds = %318
store i32 -5, i32* %56
br label %356
356: ; preds = %376, %355
%357 = load i32, i32* %56
%358 = icmp sle i32 %357, 5
br i1 %358, label %359, label %379
359: ; preds = %356
%360 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %50, i64 0, i64 0
%361 = bitcast [2 x double]* %360 to double*
%362 = load i32, i32* %56
%363 = call i32 @x2pnts(double* %361, i32 41, i32 %362)
store i32 %363, i32* %57
%364 = load i32, i32* %56
%365 = sitofp i32 %364 to double
%366 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %365)
%367 = load i32, i32* %57
%368 = sitofp i32 %367 to double
%369 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %368)
%370 = load i32, i32* %57
%371 = sext i32 %370 to i64
%372 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %50, i64 0, i64 %371
%373 = getelementptr inbounds [2 x double], [2 x double]* %372, i64 0, i64 1
%374 = load double, double* %373
%375 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %374)
br label %376
376: ; preds = %359
%377 = load i32, i32* %56
%378 = add nsw i32 %377, 1
store i32 %378, i32* %56
br label %356
379: ; preds = %356
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"value of ReT is: %f and j is: %d \0A\00"
@.str.1 = [35 x i8] c" n, its index and result are : %d \00"
@.str.2 = [6 x i8] c",%d, \00"
@.str.3 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca [41 x [2 x double]]
%2 = alloca [41 x [2 x double]]
%3 = tail call double @pow(float 1.000000e+01, i32 -18)
%4 = fmul double %3, 1.500000e+00
%5 = tail call double @pow(float 0x3DA5FD7FE0000000, i32 2)
%6 = fdiv double %4, %5
%7 = tail call double @pow(float 1.000000e+01, i32 -8)
%8 = tail call double @pow(float 1.000000e+01, i32 -9)
%9 = fmul double %6, 2.000000e+00
%10 = fmul double %9, 0x3C07A4DA07DED404
%11 = fdiv double %10, 0x39B279DC8B6970AD
%12 = fptrunc double %11 to float
%13 = tail call double @pow(float %12, i32 0)
%14 = tail call double @pow(float 1.000000e+01, i32 -6)
%15 = tail call double @pow(float 1.000000e+01, i32 -6)
%16 = tail call double @pow(float 1.000000e+01, i32 -3)
%17 = tail call double @pow(float 1.000000e+01, i32 -3)
%18 = bitcast [41 x [2 x double]]* %1 to i8*
br label %22
19: ; preds = %22
%20 = fmul double %7, 4.000000e+00
%21 = bitcast [41 x [2 x double]]* %2 to i8*
br label %40
22: ; preds = %22, %0
%23 = phi i64 [ 0, %0 ], [ %38, %22 ]
%24 = trunc i64 %23 to i32
%25 = add nsw i32 %24, -20
%26 = sitofp i32 %25 to double
%27 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %1, i64 0, i64 %23, i64 0
store double %26, double* %27
%28 = add nuw nsw i64 %23, 1
%29 = trunc i64 %28 to i32
%30 = add nsw i32 %29, -20
%31 = sitofp i32 %30 to double
%32 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %1, i64 0, i64 %28, i64 0
store double %31, double* %32
%33 = add nuw nsw i64 %23, 2
%34 = trunc i64 %33 to i32
%35 = add nsw i32 %34, -20
%36 = sitofp i32 %35 to double
%37 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %1, i64 0, i64 %33, i64 0
store double %36, double* %37
%38 = add nuw nsw i64 %23, 3
%39 = icmp eq i64 %38, 42
br i1 %39, label %19, label %22
40: ; preds = %40, %19
%41 = phi i64 [ 0, %19 ], [ %56, %40 ]
%42 = trunc i64 %41 to i32
%43 = add nsw i32 %42, -20
%44 = sitofp i32 %43 to double
%45 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %2, i64 0, i64 %41, i64 0
store double %44, double* %45
%46 = add nuw nsw i64 %41, 1
%47 = trunc i64 %46 to i32
%48 = add nsw i32 %47, -20
%49 = sitofp i32 %48 to double
%50 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %2, i64 0, i64 %46, i64 0
store double %49, double* %50
%51 = add nuw nsw i64 %41, 2
%52 = trunc i64 %51 to i32
%53 = add nsw i32 %52, -20
%54 = sitofp i32 %53 to double
%55 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %2, i64 0, i64 %51, i64 0
store double %54, double* %55
%56 = add nuw nsw i64 %41, 3
%57 = icmp eq i64 %56, 42
br i1 %57, label %58, label %40
58: ; preds = %40
%59 = fmul double %8, 1.400000e+01
%60 = tail call double @cos(float 0.000000e+00)
%61 = fmul double %60, 5.000000e-01
%62 = fsub double 1.000000e-03, %61
%63 = fmul double %20, %62
%64 = tail call double @cos(float 0.000000e+00)
%65 = fmul double %20, %64
%66 = fmul double %65, 5.000000e-01
%67 = fdiv double %20, 1.000000e+03
%68 = fsub double %66, %67
%69 = fpext double %68 to x86_fp80
%70 = fptrunc double %63 to float
%71 = fpext float %70 to x86_fp80
%72 = fcmp olt x86_fp80 %71, %69
%73 = fneg double %20
%74 = fmul double %59, %73
%75 = fmul double %74, 0.000000e+00
%76 = fptrunc double %20 to float
br label %77
77: ; preds = %58, %114
%78 = phi i64 [ -20, %58 ], [ %115, %114 ]
br i1 %72, label %79, label %114
79: ; preds = %77
%80 = trunc i64 %78 to i32
%81 = sitofp i32 %80 to double
%82 = fmul double %81, 0x401921FB54442D11
%83 = add nsw i64 %78, 20
%84 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %1, i64 0, i64 %83, i64 1
%85 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %2, i64 0, i64 %83, i64 1
br label %86
86: ; preds = %79, %86
%87 = phi float [ %70, %79 ], [ %111, %86 ]
%88 = fpext float %87 to double
%89 = fmul double %82, %88
%90 = fdiv double %89, 0x3E7AD7F29ABCAF48
%91 = fptrunc double %90 to float
%92 = tail call double @pow(float 0x3C07A4DA00000000, i32 2)
%93 = fmul double %75, %92
%94 = fmul double %93, 0x45519FC1CEC0C4CD
%95 = tail call double @pow(float %76, i32 2)
%96 = tail call double @pow(float %87, i32 2)
%97 = fneg double %96
%98 = tail call double @llvm.fmuladd.f64(double %95, double 2.500000e-01, double %97)
%99 = fmul double %13, %98
%100 = fdiv double %94, %99
%101 = fptrunc double %100 to float
%102 = fadd float %91, %101
%103 = tail call double @cos(float %102)
%104 = load double, double* %84
%105 = fadd double %103, %104
store double %105, double* %84
%106 = tail call i64 @sin(float %102)
%107 = sitofp i64 %106 to double
%108 = load double, double* %85
%109 = fadd double %108, %107
store double %109, double* %85
%110 = fadd double %67, %88
%111 = fptrunc double %110 to float
%112 = fpext float %111 to x86_fp80
%113 = fcmp olt x86_fp80 %112, %69
br i1 %113, label %86, label %114
114: ; preds = %86, %77
%115 = add nsw i64 %78, 1
%116 = icmp eq i64 %115, 21
br i1 %116, label %119, label %77
117: ; preds = %119
%118 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %1, i64 0, i64 0, i64 0
br label %133
119: ; preds = %114, %119
%120 = phi i64 [ %130, %119 ], [ 0, %114 ]
%121 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %1, i64 0, i64 %120, i64 1
%122 = load double, double* %121
%123 = fdiv double %122, 1.000000e+03
store double %123, double* %121
%124 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %2, i64 0, i64 %120, i64 1
%125 = load double, double* %124
%126 = fdiv double %125, 1.000000e+03
store double %126, double* %124
%127 = trunc i64 %120 to i32
%128 = add i32 %127, -20
%129 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), double %123, i32 %128)
%130 = add nuw nsw i64 %120, 1
%131 = icmp eq i64 %130, 41
br i1 %131, label %117, label %119
132: ; preds = %133
ret i32 0
133: ; preds = %117, %133
%134 = phi i32 [ -5, %117 ], [ %144, %133 ]
%135 = call i32 @x2pnts(double* %118, i32 41, i32 %134)
%136 = sitofp i32 %134 to double
%137 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %136)
%138 = sitofp i32 %135 to double
%139 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %138)
%140 = sext i32 %135 to i64
%141 = getelementptr inbounds [41 x [2 x double]], [41 x [2 x double]]* %1, i64 0, i64 %140, i64 1
%142 = load double, double* %141
%143 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %142)
%144 = add nsw i32 %134, 1
%145 = icmp eq i32 %144, 6
br i1 %145, label %132, label %133
}