#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*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, double);
double log(int);
int pow(double, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
double sin(int);
int main() {
  int n, restart, j, adaptive_step;
  double G, F, Y, x, a, x1, step, y, y1;
  j = 0;
  restart = 1;
  do {
    if (restart == 1) {
      printf("%s", "Введите начальную границу X = ");
      scanf("%lf", &x);
      printf("%s", "Введите A = ");
      scanf("%lf", &a);
      printf("%s", "Введите конечную границу Х1 = ");
      scanf("%lf", &x1);
      printf("%s", "Введите размер шага= ");
      scanf("%lf", &step);
      printf("%s", "Введите: \n N = 1 для нахождения значения переменной G. \n "
                   "N = 2 для нахождения значения переменной F. \n N = 3 для "
                   "нахождения значения переменной Y. \n");
      scanf("%i", &n);
      printf("%s", "Включить адаптивный шаг? 1 если да, 0 если нет");
      scanf("%i", &adaptive_step);
      FILE *file;
      file = fopen("text.txt", "w+");
      switch (n) {
      case 1:
        while (x <= x1) {
          if ((5 * pow(a, 2) - 9 * a * x + 4 * pow(x, 4)) != 0) {
            G = (5 * (-10 * pow(a, 2) + 27 * a * x + 28 * pow(x, 2))) /
                (5 * pow(a, 2) - 9 * a * x + 4 * pow(x, 4));
            fprintf(file, "%.2lf\n%.2lf\n", x, G);
            if (adaptive_step == 1) {
              if (j == 0) {
                y = G;
                printf("X=%.3lf Y=%.3lf\n", x, G);
                x += step;
              }
              if (j > 0) {
                y1 = G;
                printf("X=%.3lf Y=%.3lf\n", x, G);
              }
              if (j > 0) {
                if (((y / y1) > 2) || ((y1 / y) > 2)) {
                  x += step / 2;
                } else {
                  if (((y / y1) < 0.5) || ((y1 / y) < 0.5)) {
                    x += step * 2;
                    y = y1;
                  } else
                    x += step;
                  if (j > 1) {
                    y = y1;
                  }
                }
              }
            } else {
              printf("X=%.3lf Y=%.3lf\n", x, G);
              x += step;
            }
            j += 1;
            printf("Количество шагов:%i\n", j);
            continue;
          } else
            printf("%s\n", "G не может быть результатом деления на 0. Введите "
                           "другие значения переменных.");
          break;
        }
        break;
      case 2:
        while (x <= x1) {
          F = sin(28 * pow(a, 2) - 57 * a * x + 14 * pow(x, 2));
          if ((F >= -1) && (F <= 1)) {
            fprintf(file, "%.2lf\n%.2lf\n", x, F);
            if (adaptive_step == 1) {
              if (j == 0) {
                y = F;
                printf("X=%.3lf Y=%.3lf\n", x, F);
                x += step;
              }
              if (j > 0) {
                y1 = F;
                printf("X=%.3lf Y=%.3lf\n", x, F);
              }
              if (j > 0) {
                if (((y / y1) > 2) || ((y1 / y) > 2)) {
                  x += step / 2;
                } else {
                  if (((y / y1) < 0.5) || ((y1 / y) < 0.5)) {
                    x += step * 2;
                    y = y1;
                  } else
                    x += step;
                  if (j > 1) {
                    y = y1;
                  }
                }
              }
            } else {
              printf("X=%.3lf Y=%.3lf\n", x, F);
              x += step;
            }
            j += 1;
            printf("Количество шагов:%i\n", j);
            continue;
          }
          printf("%s\n", "Переменная F не принадлежит отрезку синуса от -1 до "
                         "1. Введите другие значения");
          break;
        }
        break;
      case 3:
        while (x <= x1) {
          Y = log(-27 * pow(a, 2) + 24 * a * x + 35 * pow(x, 2) + 1);
          if (Y > 0) {
            fprintf(file, "%.2lf\n%.2lf\n", x, Y);
            if (adaptive_step == 1) {
              if (j == 0) {
                y = Y;
                printf("X=%.3lf Y=%.3lf\n", x, Y);
                x += step;
              }
              if (j > 0) {
                y1 = Y;
                printf("X=%.3lf Y=%.3lf\n", x, Y);
              }
              if (j > 0) {
                if (((y / y1) > 2) || ((y1 / y) > 2)) {
                  x += step / 2;
                } else {
                  if (((y / y1) < 0.5) || ((y1 / y) < 0.5)) {
                    x += step * 2;
                    y = y1;
                  } else
                    x += step;
                  if (j > 1) {
                    y = y1;
                  }
                }
              }
            } else {
              printf("X=%.3lf Y=%.3lf\n", x, Y);
              x += step;
            }
            j += 1;
            printf("Количество шагов:%i\n", j);
            continue;
          } else
            printf("%s\n", "Логарифм не может быть найден при таких значениях "
                           "переменных. Введите другие значения переменных.");
          break;
        }
        break;
      default:
        printf("%s\n", "Ошибка, попросите вывод результата одной из переменных "
                       "G,F или Y.");
      }
    }
    printf("%s", "Хотите ли ещё раз просчитать функцию? \n Введите 1 если "
                 "хотите просчитать заново. \n Введите 0 для отмены.");
    scanf("%i", &restart);
    if (restart == 0)
      break;
    else
      continue;
  } while (1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1b90 <main+0xa20>
lea    0xea7(%rip),%rdi
mov    %rdi,-0x80(%rbp)
lea    0xe9f(%rip),%rsi
xor    %eax,%eax
mov    %al,-0x6d(%rbp)
call   1030 <printf@plt>
mov    -0x6d(%rbp),%al
lea    0xec1(%rip),%rdi
mov    %rdi,-0x88(%rbp)
lea    -0x38(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x80(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    0xea7(%rip),%rsi
call   1030 <printf@plt>
mov    -0x88(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    -0x40(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x80(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    0xe95(%rip),%rsi
call   1030 <printf@plt>
mov    -0x88(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    -0x48(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x80(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    0xea5(%rip),%rsi
call   1030 <printf@plt>
mov    -0x88(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    -0x50(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x80(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    0xea6(%rip),%rsi
call   1030 <printf@plt>
mov    -0x6d(%rbp),%al
lea    0xf90(%rip),%rdi
mov    %rdi,-0x78(%rbp)
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x80(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    0xf78(%rip),%rsi
call   1030 <printf@plt>
mov    -0x78(%rbp),%rdi
mov    -0x6d(%rbp),%al
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xfad(%rip),%rdi
lea    0xfaf(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x6c(%rbp)
sub    $0x1,%eax
je     12dc <main+0x16c>
jmp    12ba <main+0x14a>
mov    -0x6c(%rbp),%eax
sub    $0x2,%eax
je     1653 <main+0x4e3>
jmp    12cb <main+0x15b>
mov    -0x6c(%rbp),%eax
sub    $0x3,%eax
je     18f2 <main+0x782>
jmp    1b76 <main+0xa06>
jmp    12e1 <main+0x171>
movsd  -0x38(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     164e <main+0x4de>
movsd  -0x40(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
imul   $0x5,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xd1d(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mov    $0x4,%edi
call   1090 <pow@plt>
movsd  -0x90(%rbp),%xmm0
ff
shl    $0x2,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    137e <main+0x20e>
jp     137e <main+0x20e>
jmp    1634 <main+0x4c4>
movsd  -0x40(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
imul   $0xfffffff6,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xca1(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
movsd  -0xa8(%rbp),%xmm1
ff
imul   $0x1c,%eax,%eax
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm1
movsd  0xc55(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
imul   $0x5,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xc23(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mov    $0x4,%edi
call   1090 <pow@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm0
ff
shl    $0x2,%eax
cvtsi2sd %eax,%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x68(%rbp),%rdi
movsd  -0x38(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xdc9(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    15ee <main+0x47e>
cmpl   $0x0,-0x10(%rbp)
jne    14d0 <main+0x360>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xda2(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    14fc <main+0x38c>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xd67(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x10(%rbp)
jle    15e9 <main+0x479>
movsd  -0x58(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  0xaf8(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     153e <main+0x3ce>
movsd  -0x60(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  0xadc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    155e <main+0x3ee>
movsd  -0x50(%rbp),%xmm0
movsd  0xac5(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    15e4 <main+0x474>
movsd  -0x58(%rbp),%xmm1
divsd  -0x60(%rbp),%xmm1
movsd  0xaa8(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1596 <main+0x426>
movsd  -0x60(%rbp),%xmm1
divsd  -0x58(%rbp),%xmm1
movsd  0xa8c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    15bc <main+0x44c>
movsd  -0x50(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    15cb <main+0x45b>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x1,-0x10(%rbp)
jle    15df <main+0x46f>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    15e4 <main+0x474>
jmp    15e9 <main+0x479>
jmp    1615 <main+0x4a5>
movsd  -0x38(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xc5d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xc45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12e1 <main+0x171>
lea    0xc56(%rip),%rdi
lea    0xc53(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    164e <main+0x4de>
jmp    1b8b <main+0xa1b>
jmp    1658 <main+0x4e8>
movsd  -0x38(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     18ed <main+0x77d>
movsd  -0x40(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
imul   $0x1c,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0x99e(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
movsd  -0xb0(%rbp),%xmm0
ff
imul   $0xe,%eax,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0x928(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     18d8 <main+0x768>
movsd  0x8f6(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
jb     18d8 <main+0x768>
mov    -0x68(%rbp),%rdi
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xb25(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1892 <main+0x722>
cmpl   $0x0,-0x10(%rbp)
jne    1774 <main+0x604>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xafe(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    17a0 <main+0x630>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xac3(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x10(%rbp)
jle    188d <main+0x71d>
movsd  -0x58(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  0x854(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     17e2 <main+0x672>
movsd  -0x60(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  0x838(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1802 <main+0x692>
movsd  -0x50(%rbp),%xmm0
movsd  0x821(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1888 <main+0x718>
movsd  -0x58(%rbp),%xmm1
divsd  -0x60(%rbp),%xmm1
movsd  0x804(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     183a <main+0x6ca>
movsd  -0x60(%rbp),%xmm1
divsd  -0x58(%rbp),%xmm1
movsd  0x7e8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1860 <main+0x6f0>
movsd  -0x50(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    186f <main+0x6ff>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x1,-0x10(%rbp)
jle    1883 <main+0x713>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1888 <main+0x718>
jmp    188d <main+0x71d>
jmp    18b9 <main+0x749>
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0x9b9(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0x9a1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1658 <main+0x4e8>
lea    0x9b2(%rip),%rdi
lea    0xa3b(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1b8b <main+0xa1b>
jmp    18f7 <main+0x787>
movsd  -0x38(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1b71 <main+0xa01>
movsd  -0x40(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
imul   $0xffffffe5,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0x6dc(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mov    $0x2,%edi
call   1090 <pow@plt>
movsd  -0xb8(%rbp),%xmm0
ff
imul   $0x23,%eax,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  0x690(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <log@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1b57 <main+0x9e7>
mov    -0x68(%rbp),%rdi
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0x8a6(%rip),%rsi
call   1040 <fprintf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1b11 <main+0x9a1>
cmpl   $0x0,-0x10(%rbp)
jne    19f3 <main+0x883>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0x87f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1a1f <main+0x8af>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0x844(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x10(%rbp)
jle    1b0c <main+0x99c>
movsd  -0x58(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  0x5d5(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1a61 <main+0x8f1>
movsd  -0x60(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  0x5b9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1a81 <main+0x911>
movsd  -0x50(%rbp),%xmm0
movsd  0x5a2(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1b07 <main+0x997>
movsd  -0x58(%rbp),%xmm1
divsd  -0x60(%rbp),%xmm1
movsd  0x585(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1ab9 <main+0x949>
movsd  -0x60(%rbp),%xmm1
divsd  -0x58(%rbp),%xmm1
movsd  0x569(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1adf <main+0x96f>
movsd  -0x50(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1aee <main+0x97e>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x1,-0x10(%rbp)
jle    1b02 <main+0x992>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1b07 <main+0x997>
jmp    1b0c <main+0x99c>
jmp    1b38 <main+0x9c8>
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0x73a(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0x722(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    18f7 <main+0x787>
lea    0x733(%rip),%rdi
lea    0x848(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1b71 <main+0xa01>
jmp    1b8b <main+0xa1b>
lea    0x714(%rip),%rdi
lea    0x8de(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1b90 <main+0xa20>
lea    0x4b1(%rip),%rdi
lea    0x938(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x643(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1bc6 <main+0xa56>
jmp    1bda <main+0xa6a>
jmp    1bcb <main+0xa5b>
mov    $0x1,%al
test   $0x1,%al
jne    1190 <main+0x20>
jmp    1bda <main+0xa6a>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movl   $0x1,0x38(%rsp)
mov    $0x1,%eax
lea    0xfbc(%rip),%rbx
lea    0xfc2(%rip),%r14
lea    0x1231(%rip),%rbp
xor    %r15d,%r15d
jmp    11fb <main+0x7b>
lea    0x11b1(%rip),%rdi
mov    %r13,%rbx
lea    0x121b(%rip),%rbp
call   1030 <puts@plt>
lea    0xe7e(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1b(%rip),%rdi
lea    0x38(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0x38(%rsp),%eax
test   %eax,%eax
je     1a03 <main+0x883>
cmp    $0x1,%eax
jne    11cb <main+0x4b>
mov    %rbx,%r13
lea    0xe46(%rip),%r12
mov    %r12,%rdi
lea    0xe3f(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe67(%rip),%rbp
mov    %rbp,%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r12,%rdi
lea    0xe54(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r12,%rdi
lea    0xe48(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r12,%rdi
lea    0xe5e(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
lea    0xe74(%rip),%rbx
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    0x11fd(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
lea    0x3c(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r12,%rdi
lea    0xe46(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0x2c(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    0xe7a(%rip),%rdi
lea    0xe7c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r12
mov    0x3c(%rsp),%eax
cmp    $0x1,%eax
je     14ff <main+0x37f>
cmp    $0x2,%eax
je     151f <main+0x39f>
cmp    $0x3,%eax
jne    11b5 <main+0x35>
movsd  0x30(%rsp),%xmm0
ucomisd (%rsp),%xmm0
mov    %r13,%rbx
lea    0xe61(%rip),%r13
lea    0x10bf(%rip),%rbp
jae    1382 <main+0x202>
jmp    11cb <main+0x4b>
movsd  (%rsp),%xmm0
mov    %r14,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r15d
mov    %r13,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x30(%rsp),%xmm0
ucomisd (%rsp),%xmm0
jb     11cb <main+0x4b>
movsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
imul   $0xffffffe5,%eax,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  0xc56(%rip),%xmm2
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
mov    $0x2,%edi
call   10a0 <pow@plt>
imul   $0x23,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x8(%rsp),%xmm0
addsd  0xc29(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <log@plt>
ucomisd 0xc58(%rip),%xmm0
jbe    19f7 <main+0x877>
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
mov    %r12,%rdi
mov    %rbx,%rsi
movsd  %xmm1,0x8(%rsp)
call   1050 <fprintf@plt>
cmpl   $0x1,0x2c(%rsp)
jne    1480 <main+0x300>
movsd  0x8(%rsp),%xmm1
test   %r15d,%r15d
je     1329 <main+0x1a9>
jle    1360 <main+0x1e0>
movsd  (%rsp),%xmm0
mov    %r14,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm0
divsd  %xmm3,%xmm0
ucomisd 0xbbd(%rip),%xmm0
ja     1469 <main+0x2e9>
movapd %xmm3,%xmm1
divsd  0x10(%rsp),%xmm1
ucomisd 0xba9(%rip),%xmm1
jbe    14aa <main+0x32a>
movsd  0x18(%rsp),%xmm0
mulsd  0xba1(%rip),%xmm0
jmp    149b <main+0x31b>
nopl   0x0(%rax)
movsd  (%rsp),%xmm0
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
jmp    1360 <main+0x1e0>
movsd  0xb66(%rip),%xmm2
ucomisd %xmm0,%xmm2
seta   %al
ucomisd %xmm1,%xmm2
seta   %cl
or     %al,%cl
movsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
test   %cl,%cl
je     14d5 <main+0x355>
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm3,%xmm0
jne    14ea <main+0x36a>
movsd  0x10(%rsp),%xmm0
cmp    $0x2,%r15d
jae    14f4 <main+0x374>
movapd %xmm0,%xmm3
movsd  %xmm3,0x10(%rsp)
jmp    1360 <main+0x1e0>
movsd  0x30(%rsp),%xmm0
ucomisd (%rsp),%xmm0
jae    172f <main+0x5af>
mov    %r13,%rbx
lea    0xec7(%rip),%rbp
jmp    11cb <main+0x4b>
movsd  0x30(%rsp),%xmm0
ucomisd (%rsp),%xmm0
mov    %r13,%rbx
lea    0xc48(%rip),%r13
lea    0xea6(%rip),%rbp
jae    15a2 <main+0x422>
jmp    11cb <main+0x4b>
movsd  (%rsp),%xmm0
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r15d
mov    %r13,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x30(%rsp),%xmm0
ucomisd (%rsp),%xmm0
jb     11cb <main+0x4b>
movsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
lea    (%rax,%rax,8),%ecx
lea    (%rcx,%rcx,2),%ecx
add    %eax,%ecx
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
mulsd  0xa4c(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
mov    $0x2,%edi
call   10a0 <pow@plt>
mov    %eax,%ecx
shl    $0x4,%ecx
sub    %eax,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
addsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <sin@plt>
ucomisd 0xa15(%rip),%xmm0
jb     19df <main+0x85f>
movapd %xmm0,%xmm1
movsd  0x9e3(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     19df <main+0x85f>
movsd  (%rsp),%xmm0
mov    %r12,%rdi
mov    %rbx,%rsi
movsd  %xmm1,0x8(%rsp)
call   1050 <fprintf@plt>
cmpl   $0x1,0x2c(%rsp)
jne    16b0 <main+0x530>
test   %r15d,%r15d
je     1542 <main+0x3c2>
movsd  0x8(%rsp),%xmm1
jle    1580 <main+0x400>
movsd  (%rsp),%xmm0
mov    %r14,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm0
divsd  %xmm3,%xmm0
ucomisd 0x988(%rip),%xmm0
ja     169e <main+0x51e>
movapd %xmm3,%xmm1
divsd  0x10(%rsp),%xmm1
ucomisd 0x974(%rip),%xmm1
jbe    16da <main+0x55a>
movsd  0x18(%rsp),%xmm0
mulsd  0x96c(%rip),%xmm0
jmp    16cb <main+0x54b>
xchg   %ax,%ax
movsd  (%rsp),%xmm0
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
jmp    1580 <main+0x400>
movsd  0x936(%rip),%xmm2
ucomisd %xmm0,%xmm2
seta   %al
ucomisd %xmm1,%xmm2
seta   %cl
or     %al,%cl
movsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
test   %cl,%cl
je     1705 <main+0x585>
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm3,%xmm0
jne    171a <main+0x59a>
movsd  0x10(%rsp),%xmm0
cmp    $0x2,%r15d
jae    1724 <main+0x5a4>
movapd %xmm0,%xmm3
movsd  %xmm3,0x10(%rsp)
jmp    1580 <main+0x400>
mov    %r13,%rbx
lea    0xa43(%rip),%r13
lea    0xca1(%rip),%rbp
jmp    17a2 <main+0x622>
movsd  (%rsp),%xmm0
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r15d
mov    %r13,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x30(%rsp),%xmm0
ucomisd (%rsp),%xmm0
jb     11cb <main+0x4b>
movsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
lea    (%rax,%rax,4),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm3
movsd  0x861(%rip),%xmm2
mulsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x8(%rsp)
mov    $0x4,%edi
call   10a0 <pow@plt>
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x8(%rsp),%xmm0
ucomisd 0x845(%rip),%xmm0
jne    180b <main+0x68b>
jnp    19eb <main+0x86b>
movsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  0x801(%rip),%xmm2
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
mov    $0x2,%edi
call   10a0 <pow@plt>
lea    (%rax,%rax,8),%ecx
lea    (%rcx,%rcx,2),%ecx
add    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
addsd  0x8(%rsp),%xmm0
mulsd  0x7cf(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
lea    (%rax,%rax,4),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
mulsd  0x78c(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x40(%rsp)
mov    $0x4,%edi
call   10a0 <pow@plt>
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x40(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
mov    %r12,%rdi
mov    %rbx,%rsi
movsd  %xmm1,0x8(%rsp)
call   1050 <fprintf@plt>
cmpl   $0x1,0x2c(%rsp)
jne    1960 <main+0x7e0>
test   %r15d,%r15d
je     1742 <main+0x5c2>
movsd  0x8(%rsp),%xmm1
jle    1780 <main+0x600>
movsd  (%rsp),%xmm0
mov    %r14,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm0
divsd  %xmm3,%xmm0
ucomisd 0x6e1(%rip),%xmm0
ja     1945 <main+0x7c5>
movapd %xmm3,%xmm1
divsd  0x10(%rsp),%xmm1
ucomisd 0x6cd(%rip),%xmm1
jbe    198a <main+0x80a>
movsd  0x18(%rsp),%xmm0
mulsd  0x6c5(%rip),%xmm0
jmp    197b <main+0x7fb>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsp),%xmm0
mov    %r14,%rdi
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
jmp    1780 <main+0x600>
movsd  0x686(%rip),%xmm2
ucomisd %xmm0,%xmm2
seta   %al
ucomisd %xmm1,%xmm2
seta   %cl
or     %al,%cl
movsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
test   %cl,%cl
je     19b5 <main+0x835>
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm3,%xmm0
jne    19ca <main+0x84a>
movsd  0x10(%rsp),%xmm0
cmp    $0x2,%r15d
jae    19d4 <main+0x854>
movapd %xmm0,%xmm3
movsd  %xmm3,0x10(%rsp)
jmp    1780 <main+0x600>
lea    0x846(%rip),%rdi
jmp    11c6 <main+0x46>
lea    0x7ae(%rip),%rdi
jmp    11c6 <main+0x46>
lea    0x8ba(%rip),%rdi
jmp    11c6 <main+0x46>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [54 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BD\D0\B0\D1\87\D0\B0\D0\BB\D1\8C\D0\BD\D1\83\D1\8E \D0\B3\D1\80\D0\B0\D0\BD\D0\B8\D1\86\D1\83 X = \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [20 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 A = \00"
@.str.4 = [54 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BD\D0\B5\D1\87\D0\BD\D1\83\D1\8E \D0\B3\D1\80\D0\B0\D0\BD\D0\B8\D1\86\D1\83 \D0\A51 = \00"
@.str.5 = [39 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\80\D0\B0\D0\B7\D0\BC\D0\B5\D1\80 \D1\88\D0\B0\D0\B3\D0\B0= \00"
@.str.6 = [249 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5: \0A N = 1 \D0\B4\D0\BB\D1\8F \D0\BD\D0\B0\D1\85\D0\BE\D0\B6\D0\B4\D0\B5\D0\BD\D0\B8\D1\8F \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\BE\D0\B9 G. \0A N = 2 \D0\B4\D0\BB\D1\8F \D0\BD\D0\B0\D1\85\D0\BE\D0\B6\D0\B4\D0\B5\D0\BD\D0\B8\D1\8F \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\BE\D0\B9 F. \0A N = 3 \D0\B4\D0\BB\D1\8F \D0\BD\D0\B0\D1\85\D0\BE\D0\B6\D0\B4\D0\B5\D0\BD\D0\B8\D1\8F \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\BE\D0\B9 Y. \0A\00"
@.str.7 = [3 x i8] c"%i\00"
@.str.8 = [81 x i8] c"\D0\92\D0\BA\D0\BB\D1\8E\D1\87\D0\B8\D1\82\D1\8C \D0\B0\D0\B4\D0\B0\D0\BF\D1\82\D0\B8\D0\B2\D0\BD\D1\8B\D0\B9 \D1\88\D0\B0\D0\B3? 1 \D0\B5\D1\81\D0\BB\D0\B8 \D0\B4\D0\B0, 0 \D0\B5\D1\81\D0\BB\D0\B8 \D0\BD\D0\B5\D1\82\00"
@.str.9 = [9 x i8] c"text.txt\00"
@.str.10 = [3 x i8] c"w+\00"
@.str.11 = [13 x i8] c"%.2lf\0A%.2lf\0A\00"
@.str.12 = [17 x i8] c"X=%.3lf Y=%.3lf\0A\00"
@.str.13 = [36 x i8] c"\D0\9A\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D1\88\D0\B0\D0\B3\D0\BE\D0\B2:%i\0A\00"
@.str.14 = [4 x i8] c"%s\0A\00"
@.str.15 = [140 x i8] c"G \D0\BD\D0\B5 \D0\BC\D0\BE\D0\B6\D0\B5\D1\82 \D0\B1\D1\8B\D1\82\D1\8C \D1\80\D0\B5\D0\B7\D1\83\D0\BB\D1\8C\D1\82\D0\B0\D1\82\D0\BE\D0\BC \D0\B4\D0\B5\D0\BB\D0\B5\D0\BD\D0\B8\D1\8F \D0\BD\D0\B0 0. \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\B8\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85.\00"
@.str.16 = [140 x i8] c"\D0\9F\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\B0\D1\8F F \D0\BD\D0\B5 \D0\BF\D1\80\D0\B8\D0\BD\D0\B0\D0\B4\D0\BB\D0\B5\D0\B6\D0\B8\D1\82 \D0\BE\D1\82\D1\80\D0\B5\D0\B7\D0\BA\D1\83 \D1\81\D0\B8\D0\BD\D1\83\D1\81\D0\B0 \D0\BE\D1\82 -1 \D0\B4\D0\BE 1. \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\B8\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F\00"
@.str.17 = [181 x i8] c"\D0\9B\D0\BE\D0\B3\D0\B0\D1\80\D0\B8\D1\84\D0\BC \D0\BD\D0\B5 \D0\BC\D0\BE\D0\B6\D0\B5\D1\82 \D0\B1\D1\8B\D1\82\D1\8C \D0\BD\D0\B0\D0\B9\D0\B4\D0\B5\D0\BD \D0\BF\D1\80\D0\B8 \D1\82\D0\B0\D0\BA\D0\B8\D1\85 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F\D1\85 \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85. \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\B8\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85.\00"
@.str.18 = [116 x i8] c"\D0\9E\D1\88\D0\B8\D0\B1\D0\BA\D0\B0, \D0\BF\D0\BE\D0\BF\D1\80\D0\BE\D1\81\D0\B8\D1\82\D0\B5 \D0\B2\D1\8B\D0\B2\D0\BE\D0\B4 \D1\80\D0\B5\D0\B7\D1\83\D0\BB\D1\8C\D1\82\D0\B0\D1\82\D0\B0 \D0\BE\D0\B4\D0\BD\D0\BE\D0\B9 \D0\B8\D0\B7 \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85 G,F \D0\B8\D0\BB\D0\B8 Y.\00"
@.str.19 = [185 x i8] c"\D0\A5\D0\BE\D1\82\D0\B8\D1\82\D0\B5 \D0\BB\D0\B8 \D0\B5\D1\89\D1\91 \D1\80\D0\B0\D0\B7 \D0\BF\D1\80\D0\BE\D1\81\D1\87\D0\B8\D1\82\D0\B0\D1\82\D1\8C \D1\84\D1\83\D0\BD\D0\BA\D1\86\D0\B8\D1\8E? \0A \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 1 \D0\B5\D1\81\D0\BB\D0\B8 \D1\85\D0\BE\D1\82\D0\B8\D1\82\D0\B5 \D0\BF\D1\80\D0\BE\D1\81\D1\87\D0\B8\D1\82\D0\B0\D1\82\D1\8C \D0\B7\D0\B0\D0\BD\D0\BE\D0\B2\D0\BE. \0A \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 0 \D0\B4\D0\BB\D1\8F \D0\BE\D1\82\D0\BC\D0\B5\D0\BD\D1\8B.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%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 i32*
store i32 0, i32* %1
store i32 0, i32* %4
store i32 1, i32* %3
br label %16
16: ; preds = %405, %0
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %398
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %9)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %10)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %11)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %12)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([249 x i8], [249 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %2)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0))
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %5)
%32 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
store i32* %32, i32** %15
%33 = load i32, i32* %2
switch i32 %33, label %395 [
i32 1, label %34
i32 2, label %171
i32 3, label %284
]
34: ; preds = %19
br label %35
35: ; preds = %162, %34
%36 = load double, double* %9
%37 = load double, double* %11
%38 = fcmp ole double %36, %37
br i1 %38, label %39, label %170
39: ; preds = %35
%40 = load double, double* %10
%41 = call i32 @pow(double %40, i32 2)
%42 = mul nsw i32 5, %41
%43 = sitofp i32 %42 to double
%44 = load double, double* %10
%45 = fmul double 9.000000e+00, %44
%46 = load double, double* %9
%47 = fneg double %45
%48 = call double @llvm.fmuladd.f64(double %47, double %46, double %43)
%49 = load double, double* %9
%50 = call i32 @pow(double %49, i32 4)
%51 = mul nsw i32 4, %50
%52 = sitofp i32 %51 to double
%53 = fadd double %48, %52
%54 = fcmp une double %53, 0.000000e+00
br i1 %54, label %55, label %167
55: ; preds = %39
%56 = load double, double* %10
%57 = call i32 @pow(double %56, i32 2)
%58 = mul nsw i32 -10, %57
%59 = sitofp i32 %58 to double
%60 = load double, double* %10
%61 = fmul double 2.700000e+01, %60
%62 = load double, double* %9
%63 = call double @llvm.fmuladd.f64(double %61, double %62, double %59)
%64 = load double, double* %9
%65 = call i32 @pow(double %64, i32 2)
%66 = mul nsw i32 28, %65
%67 = sitofp i32 %66 to double
%68 = fadd double %63, %67
%69 = fmul double 5.000000e+00, %68
%70 = load double, double* %10
%71 = call i32 @pow(double %70, i32 2)
%72 = mul nsw i32 5, %71
%73 = sitofp i32 %72 to double
%74 = load double, double* %10
%75 = fmul double 9.000000e+00, %74
%76 = load double, double* %9
%77 = fneg double %75
%78 = call double @llvm.fmuladd.f64(double %77, double %76, double %73)
%79 = load double, double* %9
%80 = call i32 @pow(double %79, i32 4)
%81 = mul nsw i32 4, %80
%82 = sitofp i32 %81 to double
%83 = fadd double %78, %82
%84 = fdiv double %69, %83
store double %84, double* %6
%85 = load i32*, i32** %15
%86 = load double, double* %9
%87 = load double, double* %6
%88 = call i32 @fprintf(i32* %85, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), double %86, double %87)
%89 = load i32, i32* %5
%90 = icmp eq i32 %89, 1
br i1 %90, label %91, label %155
91: ; preds = %55
%92 = load i32, i32* %4
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %102
94: ; preds = %91
%95 = load double, double* %6
store double %95, double* %13
%96 = load double, double* %9
%97 = load double, double* %6
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %96, double %97)
%99 = load double, double* %12
%100 = load double, double* %9
%101 = fadd double %100, %99
store double %101, double* %9
br label %102
102: ; preds = %94, %91
%103 = load i32, i32* %4
%104 = icmp sgt i32 %103, 0
br i1 %104, label %105, label %110
105: ; preds = %102
%106 = load double, double* %6
store double %106, double* %14
%107 = load double, double* %9
%108 = load double, double* %6
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %107, double %108)
br label %110
110: ; preds = %105, %102
%111 = load i32, i32* %4
%112 = icmp sgt i32 %111, 0
br i1 %112, label %113, label %154
113: ; preds = %110
%114 = load double, double* %13
%115 = load double, double* %14
%116 = fdiv double %114, %115
%117 = fcmp ogt double %116, 2.000000e+00
br i1 %117, label %123, label %118
118: ; preds = %113
%119 = load double, double* %14
%120 = load double, double* %13
%121 = fdiv double %119, %120
%122 = fcmp ogt double %121, 2.000000e+00
br i1 %122, label %123, label %128
123: ; preds = %118, %113
%124 = load double, double* %12
%125 = fdiv double %124, 2.000000e+00
%126 = load double, double* %9
%127 = fadd double %126, %125
store double %127, double* %9
br label %153
128: ; preds = %118
%129 = load double, double* %13
%130 = load double, double* %14
%131 = fdiv double %129, %130
%132 = fcmp olt double %131, 5.000000e-01
br i1 %132, label %138, label %133
133: ; preds = %128
%134 = load double, double* %14
%135 = load double, double* %13
%136 = fdiv double %134, %135
%137 = fcmp olt double %136, 5.000000e-01
br i1 %137, label %138, label %143
138: ; preds = %133, %128
%139 = load double, double* %12
%140 = load double, double* %9
%141 = call double @llvm.fmuladd.f64(double %139, double 2.000000e+00, double %140)
store double %141, double* %9
%142 = load double, double* %14
store double %142, double* %13
br label %147
143: ; preds = %133
%144 = load double, double* %12
%145 = load double, double* %9
%146 = fadd double %145, %144
store double %146, double* %9
br label %147
147: ; preds = %143, %138
%148 = load i32, i32* %4
%149 = icmp sgt i32 %148, 1
br i1 %149, label %150, label %152
150: ; preds = %147
%151 = load double, double* %14
store double %151, double* %13
br label %152
152: ; preds = %150, %147
br label %153
153: ; preds = %152, %123
br label %154
154: ; preds = %153, %110
br label %162
155: ; preds = %55
%156 = load double, double* %9
%157 = load double, double* %6
%158 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %156, double %157)
%159 = load double, double* %12
%160 = load double, double* %9
%161 = fadd double %160, %159
store double %161, double* %9
br label %162
162: ; preds = %155, %154
%163 = load i32, i32* %4
%164 = add nsw i32 %163, 1
store i32 %164, i32* %4
%165 = load i32, i32* %4
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i32 %165)
br label %35
167: ; preds = %39
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.15, i64 0, i64 0))
br label %169
169: ; preds = %167
br label %170
170: ; preds = %169, %35
br label %397
171: ; preds = %19
br label %172
172: ; preds = %276, %171
%173 = load double, double* %9
%174 = load double, double* %11
%175 = fcmp ole double %173, %174
br i1 %175, label %176, label %283
176: ; preds = %172
%177 = load double, double* %10
%178 = call i32 @pow(double %177, i32 2)
%179 = mul nsw i32 28, %178
%180 = sitofp i32 %179 to double
%181 = load double, double* %10
%182 = fmul double 5.700000e+01, %181
%183 = load double, double* %9
%184 = fneg double %182
%185 = call double @llvm.fmuladd.f64(double %184, double %183, double %180)
%186 = load double, double* %9
%187 = call i32 @pow(double %186, i32 2)
%188 = mul nsw i32 14, %187
%189 = sitofp i32 %188 to double
%190 = fadd double %185, %189
%191 = fptosi double %190 to i32
%192 = call double @sin(i32 %191)
store double %192, double* %7
%193 = load double, double* %7
%194 = fcmp oge double %193, -1.000000e+00
br i1 %194, label %195, label %281
195: ; preds = %176
%196 = load double, double* %7
%197 = fcmp ole double %196, 1.000000e+00
br i1 %197, label %198, label %281
198: ; preds = %195
%199 = load i32*, i32** %15
%200 = load double, double* %9
%201 = load double, double* %7
%202 = call i32 @fprintf(i32* %199, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), double %200, double %201)
%203 = load i32, i32* %5
%204 = icmp eq i32 %203, 1
br i1 %204, label %205, label %269
205: ; preds = %198
%206 = load i32, i32* %4
%207 = icmp eq i32 %206, 0
br i1 %207, label %208, label %216
208: ; preds = %205
%209 = load double, double* %7
store double %209, double* %13
%210 = load double, double* %9
%211 = load double, double* %7
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %210, double %211)
%213 = load double, double* %12
%214 = load double, double* %9
%215 = fadd double %214, %213
store double %215, double* %9
br label %216
216: ; preds = %208, %205
%217 = load i32, i32* %4
%218 = icmp sgt i32 %217, 0
br i1 %218, label %219, label %224
219: ; preds = %216
%220 = load double, double* %7
store double %220, double* %14
%221 = load double, double* %9
%222 = load double, double* %7
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %221, double %222)
br label %224
224: ; preds = %219, %216
%225 = load i32, i32* %4
%226 = icmp sgt i32 %225, 0
br i1 %226, label %227, label %268
227: ; preds = %224
%228 = load double, double* %13
%229 = load double, double* %14
%230 = fdiv double %228, %229
%231 = fcmp ogt double %230, 2.000000e+00
br i1 %231, label %237, label %232
232: ; preds = %227
%233 = load double, double* %14
%234 = load double, double* %13
%235 = fdiv double %233, %234
%236 = fcmp ogt double %235, 2.000000e+00
br i1 %236, label %237, label %242
237: ; preds = %232, %227
%238 = load double, double* %12
%239 = fdiv double %238, 2.000000e+00
%240 = load double, double* %9
%241 = fadd double %240, %239
store double %241, double* %9
br label %267
242: ; preds = %232
%243 = load double, double* %13
%244 = load double, double* %14
%245 = fdiv double %243, %244
%246 = fcmp olt double %245, 5.000000e-01
br i1 %246, label %252, label %247
247: ; preds = %242
%248 = load double, double* %14
%249 = load double, double* %13
%250 = fdiv double %248, %249
%251 = fcmp olt double %250, 5.000000e-01
br i1 %251, label %252, label %257
252: ; preds = %247, %242
%253 = load double, double* %12
%254 = load double, double* %9
%255 = call double @llvm.fmuladd.f64(double %253, double 2.000000e+00, double %254)
store double %255, double* %9
%256 = load double, double* %14
store double %256, double* %13
br label %261
257: ; preds = %247
%258 = load double, double* %12
%259 = load double, double* %9
%260 = fadd double %259, %258
store double %260, double* %9
br label %261
261: ; preds = %257, %252
%262 = load i32, i32* %4
%263 = icmp sgt i32 %262, 1
br i1 %263, label %264, label %266
264: ; preds = %261
%265 = load double, double* %14
store double %265, double* %13
br label %266
266: ; preds = %264, %261
br label %267
267: ; preds = %266, %237
br label %268
268: ; preds = %267, %224
br label %276
269: ; preds = %198
%270 = load double, double* %9
%271 = load double, double* %7
%272 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %270, double %271)
%273 = load double, double* %12
%274 = load double, double* %9
%275 = fadd double %274, %273
store double %275, double* %9
br label %276
276: ; preds = %269, %268
%277 = load i32, i32* %4
%278 = add nsw i32 %277, 1
store i32 %278, i32* %4
%279 = load i32, i32* %4
%280 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i32 %279)
br label %172
281: ; preds = %195, %176
%282 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.16, i64 0, i64 0))
br label %283
283: ; preds = %281, %172
br label %397
284: ; preds = %19
br label %285
285: ; preds = %386, %284
%286 = load double, double* %9
%287 = load double, double* %11
%288 = fcmp ole double %286, %287
br i1 %288, label %289, label %394
289: ; preds = %285
%290 = load double, double* %10
%291 = call i32 @pow(double %290, i32 2)
%292 = mul nsw i32 -27, %291
%293 = sitofp i32 %292 to double
%294 = load double, double* %10
%295 = fmul double 2.400000e+01, %294
%296 = load double, double* %9
%297 = call double @llvm.fmuladd.f64(double %295, double %296, double %293)
%298 = load double, double* %9
%299 = call i32 @pow(double %298, i32 2)
%300 = mul nsw i32 35, %299
%301 = sitofp i32 %300 to double
%302 = fadd double %297, %301
%303 = fadd double %302, 1.000000e+00
%304 = fptosi double %303 to i32
%305 = call double @log(i32 %304)
store double %305, double* %8
%306 = load double, double* %8
%307 = fcmp ogt double %306, 0.000000e+00
br i1 %307, label %308, label %391
308: ; preds = %289
%309 = load i32*, i32** %15
%310 = load double, double* %9
%311 = load double, double* %8
%312 = call i32 @fprintf(i32* %309, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), double %310, double %311)
%313 = load i32, i32* %5
%314 = icmp eq i32 %313, 1
br i1 %314, label %315, label %379
315: ; preds = %308
%316 = load i32, i32* %4
%317 = icmp eq i32 %316, 0
br i1 %317, label %318, label %326
318: ; preds = %315
%319 = load double, double* %8
store double %319, double* %13
%320 = load double, double* %9
%321 = load double, double* %8
%322 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %320, double %321)
%323 = load double, double* %12
%324 = load double, double* %9
%325 = fadd double %324, %323
store double %325, double* %9
br label %326
326: ; preds = %318, %315
%327 = load i32, i32* %4
%328 = icmp sgt i32 %327, 0
br i1 %328, label %329, label %334
329: ; preds = %326
%330 = load double, double* %8
store double %330, double* %14
%331 = load double, double* %9
%332 = load double, double* %8
%333 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %331, double %332)
br label %334
334: ; preds = %329, %326
%335 = load i32, i32* %4
%336 = icmp sgt i32 %335, 0
br i1 %336, label %337, label %378
337: ; preds = %334
%338 = load double, double* %13
%339 = load double, double* %14
%340 = fdiv double %338, %339
%341 = fcmp ogt double %340, 2.000000e+00
br i1 %341, label %347, label %342
342: ; preds = %337
%343 = load double, double* %14
%344 = load double, double* %13
%345 = fdiv double %343, %344
%346 = fcmp ogt double %345, 2.000000e+00
br i1 %346, label %347, label %352
347: ; preds = %342, %337
%348 = load double, double* %12
%349 = fdiv double %348, 2.000000e+00
%350 = load double, double* %9
%351 = fadd double %350, %349
store double %351, double* %9
br label %377
352: ; preds = %342
%353 = load double, double* %13
%354 = load double, double* %14
%355 = fdiv double %353, %354
%356 = fcmp olt double %355, 5.000000e-01
br i1 %356, label %362, label %357
357: ; preds = %352
%358 = load double, double* %14
%359 = load double, double* %13
%360 = fdiv double %358, %359
%361 = fcmp olt double %360, 5.000000e-01
br i1 %361, label %362, label %367
362: ; preds = %357, %352
%363 = load double, double* %12
%364 = load double, double* %9
%365 = call double @llvm.fmuladd.f64(double %363, double 2.000000e+00, double %364)
store double %365, double* %9
%366 = load double, double* %14
store double %366, double* %13
br label %371
367: ; preds = %357
%368 = load double, double* %12
%369 = load double, double* %9
%370 = fadd double %369, %368
store double %370, double* %9
br label %371
371: ; preds = %367, %362
%372 = load i32, i32* %4
%373 = icmp sgt i32 %372, 1
br i1 %373, label %374, label %376
374: ; preds = %371
%375 = load double, double* %14
store double %375, double* %13
br label %376
376: ; preds = %374, %371
br label %377
377: ; preds = %376, %347
br label %378
378: ; preds = %377, %334
br label %386
379: ; preds = %308
%380 = load double, double* %9
%381 = load double, double* %8
%382 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %380, double %381)
%383 = load double, double* %12
%384 = load double, double* %9
%385 = fadd double %384, %383
store double %385, double* %9
br label %386
386: ; preds = %379, %378
%387 = load i32, i32* %4
%388 = add nsw i32 %387, 1
store i32 %388, i32* %4
%389 = load i32, i32* %4
%390 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i32 %389)
br label %285
391: ; preds = %289
%392 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str.17, i64 0, i64 0))
br label %393
393: ; preds = %391
br label %394
394: ; preds = %393, %285
br label %397
395: ; preds = %19
%396 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.18, i64 0, i64 0))
br label %397
397: ; preds = %395, %394, %283, %170
br label %398
398: ; preds = %397, %16
%399 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.19, i64 0, i64 0))
%400 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %3)
%401 = load i32, i32* %3
%402 = icmp eq i32 %401, 0
br i1 %402, label %403, label %404
403: ; preds = %398
br label %406
404: ; preds = %398
br label %405
405: ; preds = %404
br i1 true, label %16, label %406
406: ; preds = %405, %403
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [54 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BD\D0\B0\D1\87\D0\B0\D0\BB\D1\8C\D0\BD\D1\83\D1\8E \D0\B3\D1\80\D0\B0\D0\BD\D0\B8\D1\86\D1\83 X = \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [20 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 A = \00"
@.str.4 = [54 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BD\D0\B5\D1\87\D0\BD\D1\83\D1\8E \D0\B3\D1\80\D0\B0\D0\BD\D0\B8\D1\86\D1\83 \D0\A51 = \00"
@.str.5 = [39 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D1\80\D0\B0\D0\B7\D0\BC\D0\B5\D1\80 \D1\88\D0\B0\D0\B3\D0\B0= \00"
@.str.7 = [3 x i8] c"%i\00"
@.str.8 = [81 x i8] c"\D0\92\D0\BA\D0\BB\D1\8E\D1\87\D0\B8\D1\82\D1\8C \D0\B0\D0\B4\D0\B0\D0\BF\D1\82\D0\B8\D0\B2\D0\BD\D1\8B\D0\B9 \D1\88\D0\B0\D0\B3? 1 \D0\B5\D1\81\D0\BB\D0\B8 \D0\B4\D0\B0, 0 \D0\B5\D1\81\D0\BB\D0\B8 \D0\BD\D0\B5\D1\82\00"
@.str.9 = [9 x i8] c"text.txt\00"
@.str.10 = [3 x i8] c"w+\00"
@.str.11 = [13 x i8] c"%.2lf\0A%.2lf\0A\00"
@.str.12 = [17 x i8] c"X=%.3lf Y=%.3lf\0A\00"
@.str.13 = [36 x i8] c"\D0\9A\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D1\88\D0\B0\D0\B3\D0\BE\D0\B2:%i\0A\00"
@.str.15 = [140 x i8] c"G \D0\BD\D0\B5 \D0\BC\D0\BE\D0\B6\D0\B5\D1\82 \D0\B1\D1\8B\D1\82\D1\8C \D1\80\D0\B5\D0\B7\D1\83\D0\BB\D1\8C\D1\82\D0\B0\D1\82\D0\BE\D0\BC \D0\B4\D0\B5\D0\BB\D0\B5\D0\BD\D0\B8\D1\8F \D0\BD\D0\B0 0. \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\B8\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85.\00"
@.str.16 = [140 x i8] c"\D0\9F\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\B0\D1\8F F \D0\BD\D0\B5 \D0\BF\D1\80\D0\B8\D0\BD\D0\B0\D0\B4\D0\BB\D0\B5\D0\B6\D0\B8\D1\82 \D0\BE\D1\82\D1\80\D0\B5\D0\B7\D0\BA\D1\83 \D1\81\D0\B8\D0\BD\D1\83\D1\81\D0\B0 \D0\BE\D1\82 -1 \D0\B4\D0\BE 1. \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\B8\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F\00"
@.str.17 = [181 x i8] c"\D0\9B\D0\BE\D0\B3\D0\B0\D1\80\D0\B8\D1\84\D0\BC \D0\BD\D0\B5 \D0\BC\D0\BE\D0\B6\D0\B5\D1\82 \D0\B1\D1\8B\D1\82\D1\8C \D0\BD\D0\B0\D0\B9\D0\B4\D0\B5\D0\BD \D0\BF\D1\80\D0\B8 \D1\82\D0\B0\D0\BA\D0\B8\D1\85 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F\D1\85 \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85. \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B4\D1\80\D1\83\D0\B3\D0\B8\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85.\00"
@.str.18 = [116 x i8] c"\D0\9E\D1\88\D0\B8\D0\B1\D0\BA\D0\B0, \D0\BF\D0\BE\D0\BF\D1\80\D0\BE\D1\81\D0\B8\D1\82\D0\B5 \D0\B2\D1\8B\D0\B2\D0\BE\D0\B4 \D1\80\D0\B5\D0\B7\D1\83\D0\BB\D1\8C\D1\82\D0\B0\D1\82\D0\B0 \D0\BE\D0\B4\D0\BD\D0\BE\D0\B9 \D0\B8\D0\B7 \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D1\8B\D1\85 G,F \D0\B8\D0\BB\D0\B8 Y.\00"
@.str.19 = [185 x i8] c"\D0\A5\D0\BE\D1\82\D0\B8\D1\82\D0\B5 \D0\BB\D0\B8 \D0\B5\D1\89\D1\91 \D1\80\D0\B0\D0\B7 \D0\BF\D1\80\D0\BE\D1\81\D1\87\D0\B8\D1\82\D0\B0\D1\82\D1\8C \D1\84\D1\83\D0\BD\D0\BA\D1\86\D0\B8\D1\8E? \0A \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 1 \D0\B5\D1\81\D0\BB\D0\B8 \D1\85\D0\BE\D1\82\D0\B8\D1\82\D0\B5 \D0\BF\D1\80\D0\BE\D1\81\D1\87\D0\B8\D1\82\D0\B0\D1\82\D1\8C \D0\B7\D0\B0\D0\BD\D0\BE\D0\B2\D0\BE. \0A \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 0 \D0\B4\D0\BB\D1\8F \D0\BE\D1\82\D0\BC\D0\B5\D0\BD\D1\8B.\00"
@str = [248 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5: \0A N = 1 \D0\B4\D0\BB\D1\8F \D0\BD\D0\B0\D1\85\D0\BE\D0\B6\D0\B4\D0\B5\D0\BD\D0\B8\D1\8F \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\BE\D0\B9 G. \0A N = 2 \D0\B4\D0\BB\D1\8F \D0\BD\D0\B0\D1\85\D0\BE\D0\B6\D0\B4\D0\B5\D0\BD\D0\B8\D1\8F \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\BE\D0\B9 F. \0A N = 3 \D0\B4\D0\BB\D1\8F \D0\BD\D0\B0\D1\85\D0\BE\D0\B6\D0\B4\D0\B5\D0\BD\D0\B8\D1\8F \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D1\8F \D0\BF\D0\B5\D1\80\D0\B5\D0\BC\D0\B5\D0\BD\D0\BD\D0\BE\D0\B9 Y. \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = bitcast i32* %1 to i8*
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = bitcast double* %4 to i8*
%12 = bitcast double* %5 to i8*
%13 = bitcast double* %6 to i8*
%14 = bitcast double* %7 to i8*
store i32 1, i32* %2
br label %15
15: ; preds = %292, %0
%16 = phi i32 [ %297, %292 ], [ 1, %0 ]
%17 = phi double [ %293, %292 ], [ undef, %0 ]
%18 = phi i32 [ %294, %292 ], [ 0, %0 ]
%19 = icmp eq i32 %16, 1
br i1 %19, label %20, label %292
20: ; preds = %15
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %4)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %5)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %6)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %7)
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([248 x i8], [248 x i8]* @str, i64 0, i64 0))
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %1)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0))
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %3)
%33 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%34 = load i32, i32* %1
switch i32 %34, label %287 [
i32 1, label %43
i32 2, label %39
i32 3, label %35
]
35: ; preds = %20
%36 = load double, double* %4
%37 = load double, double* %6
%38 = fcmp ugt double %36, %37
br i1 %38, label %292, label %215
39: ; preds = %20
%40 = load double, double* %4
%41 = load double, double* %6
%42 = fcmp ugt double %40, %41
br i1 %42, label %292, label %142
43: ; preds = %20
%44 = load double, double* %4
%45 = load double, double* %6
%46 = fcmp ugt double %44, %45
br i1 %46, label %292, label %47
47: ; preds = %43, %135
%48 = phi i32 [ %137, %135 ], [ %18, %43 ]
%49 = phi double [ %136, %135 ], [ %17, %43 ]
%50 = load double, double* %5
%51 = call i32 @pow(double %50, i32 2)
%52 = mul nsw i32 %51, 5
%53 = sitofp i32 %52 to double
%54 = load double, double* %5
%55 = load double, double* %4
%56 = fmul double %54, -9.000000e+00
%57 = call double @llvm.fmuladd.f64(double %56, double %55, double %53)
%58 = call i32 @pow(double %55, i32 4)
%59 = shl nsw i32 %58, 2
%60 = sitofp i32 %59 to double
%61 = fadd double %57, %60
%62 = fcmp une double %61, 0.000000e+00
br i1 %62, label %63, label %287
63: ; preds = %47
%64 = load double, double* %5
%65 = call i32 @pow(double %64, i32 2)
%66 = mul nsw i32 %65, -10
%67 = sitofp i32 %66 to double
%68 = load double, double* %5
%69 = fmul double %68, 2.700000e+01
%70 = load double, double* %4
%71 = call double @llvm.fmuladd.f64(double %69, double %70, double %67)
%72 = call i32 @pow(double %70, i32 2)
%73 = mul nsw i32 %72, 28
%74 = sitofp i32 %73 to double
%75 = fadd double %71, %74
%76 = fmul double %75, 5.000000e+00
%77 = load double, double* %5
%78 = call i32 @pow(double %77, i32 2)
%79 = mul nsw i32 %78, 5
%80 = sitofp i32 %79 to double
%81 = load double, double* %5
%82 = load double, double* %4
%83 = fmul double %81, -9.000000e+00
%84 = call double @llvm.fmuladd.f64(double %83, double %82, double %80)
%85 = call i32 @pow(double %82, i32 4)
%86 = shl nsw i32 %85, 2
%87 = sitofp i32 %86 to double
%88 = fadd double %84, %87
%89 = fdiv double %76, %88
%90 = load double, double* %4
%91 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), double %90, double %89)
%92 = load i32, i32* %3
%93 = icmp eq i32 %92, 1
br i1 %93, label %94, label %129
94: ; preds = %63
%95 = icmp eq i32 %48, 0
br i1 %95, label %98, label %96
96: ; preds = %94
%97 = icmp sgt i32 %48, 0
br i1 %97, label %104, label %135
98: ; preds = %94
%99 = load double, double* %4
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %99, double %89)
%101 = load double, double* %7
%102 = load double, double* %4
%103 = fadd double %101, %102
store double %103, double* %4
br label %135
104: ; preds = %96
%105 = load double, double* %4
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %105, double %89)
%107 = fdiv double %49, %89
%108 = fcmp ogt double %107, 2.000000e+00
br i1 %108, label %112, label %109
109: ; preds = %104
%110 = fdiv double %89, %49
%111 = fcmp ogt double %110, 2.000000e+00
br i1 %111, label %112, label %117
112: ; preds = %109, %104
%113 = load double, double* %7
%114 = fmul double %113, 5.000000e-01
%115 = load double, double* %4
%116 = fadd double %115, %114
store double %116, double* %4
br label %135
117: ; preds = %109
%118 = fcmp olt double %107, 5.000000e-01
%119 = fcmp olt double %110, 5.000000e-01
%120 = or i1 %118, %119
%121 = load double, double* %7
%122 = load double, double* %4
%123 = fadd double %121, %122
%124 = call double @llvm.fmuladd.f64(double %121, double 2.000000e+00, double %122)
%125 = select i1 %120, double %124, double %123
store double %125, double* %4
%126 = icmp ugt i32 %48, 1
%127 = select i1 %126, i1 true, i1 %120
%128 = select i1 %127, double %89, double %49
br label %135
129: ; preds = %63
%130 = load double, double* %4
%131 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %130, double %89)
%132 = load double, double* %7
%133 = load double, double* %4
%134 = fadd double %132, %133
store double %134, double* %4
br label %135
135: ; preds = %96, %98, %117, %112, %129
%136 = phi double [ %49, %112 ], [ %89, %98 ], [ %49, %129 ], [ %128, %117 ], [ %49, %96 ]
%137 = add nsw i32 %48, 1
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i32 %137)
%139 = load double, double* %4
%140 = load double, double* %6
%141 = fcmp ugt double %139, %140
br i1 %141, label %292, label %47
142: ; preds = %39, %208
%143 = phi i32 [ %210, %208 ], [ %18, %39 ]
%144 = phi double [ %209, %208 ], [ %17, %39 ]
%145 = load double, double* %5
%146 = call i32 @pow(double %145, i32 2)
%147 = mul nsw i32 %146, 28
%148 = sitofp i32 %147 to double
%149 = load double, double* %5
%150 = load double, double* %4
%151 = fmul double %149, -5.700000e+01
%152 = call double @llvm.fmuladd.f64(double %151, double %150, double %148)
%153 = call i32 @pow(double %150, i32 2)
%154 = mul nsw i32 %153, 14
%155 = sitofp i32 %154 to double
%156 = fadd double %152, %155
%157 = fptosi double %156 to i32
%158 = call double @sin(i32 %157)
%159 = fcmp oge double %158, -1.000000e+00
%160 = fcmp ole double %158, 1.000000e+00
%161 = and i1 %159, %160
br i1 %161, label %162, label %287
162: ; preds = %142
%163 = load double, double* %4
%164 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), double %163, double %158)
%165 = load i32, i32* %3
%166 = icmp eq i32 %165, 1
br i1 %166, label %167, label %202
167: ; preds = %162
%168 = icmp eq i32 %143, 0
br i1 %168, label %171, label %169
169: ; preds = %167
%170 = icmp sgt i32 %143, 0
br i1 %170, label %177, label %208
171: ; preds = %167
%172 = load double, double* %4
%173 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %172, double %158)
%174 = load double, double* %7
%175 = load double, double* %4
%176 = fadd double %174, %175
store double %176, double* %4
br label %208
177: ; preds = %169
%178 = load double, double* %4
%179 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %178, double %158)
%180 = fdiv double %144, %158
%181 = fcmp ogt double %180, 2.000000e+00
br i1 %181, label %185, label %182
182: ; preds = %177
%183 = fdiv double %158, %144
%184 = fcmp ogt double %183, 2.000000e+00
br i1 %184, label %185, label %190
185: ; preds = %182, %177
%186 = load double, double* %7
%187 = fmul double %186, 5.000000e-01
%188 = load double, double* %4
%189 = fadd double %188, %187
store double %189, double* %4
br label %208
190: ; preds = %182
%191 = fcmp olt double %180, 5.000000e-01
%192 = fcmp olt double %183, 5.000000e-01
%193 = or i1 %191, %192
%194 = load double, double* %7
%195 = load double, double* %4
%196 = fadd double %194, %195
%197 = call double @llvm.fmuladd.f64(double %194, double 2.000000e+00, double %195)
%198 = select i1 %193, double %197, double %196
store double %198, double* %4
%199 = icmp ugt i32 %143, 1
%200 = select i1 %199, i1 true, i1 %193
%201 = select i1 %200, double %158, double %144
br label %208
202: ; preds = %162
%203 = load double, double* %4
%204 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %203, double %158)
%205 = load double, double* %7
%206 = load double, double* %4
%207 = fadd double %205, %206
store double %207, double* %4
br label %208
208: ; preds = %169, %171, %190, %185, %202
%209 = phi double [ %144, %185 ], [ %158, %171 ], [ %144, %202 ], [ %201, %190 ], [ %144, %169 ]
%210 = add nsw i32 %143, 1
%211 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i32 %210)
%212 = load double, double* %4
%213 = load double, double* %6
%214 = fcmp ugt double %212, %213
br i1 %214, label %292, label %142
215: ; preds = %35, %280
%216 = phi i32 [ %282, %280 ], [ %18, %35 ]
%217 = phi double [ %281, %280 ], [ %17, %35 ]
%218 = load double, double* %5
%219 = call i32 @pow(double %218, i32 2)
%220 = mul nsw i32 %219, -27
%221 = sitofp i32 %220 to double
%222 = load double, double* %5
%223 = fmul double %222, 2.400000e+01
%224 = load double, double* %4
%225 = call double @llvm.fmuladd.f64(double %223, double %224, double %221)
%226 = call i32 @pow(double %224, i32 2)
%227 = mul nsw i32 %226, 35
%228 = sitofp i32 %227 to double
%229 = fadd double %225, %228
%230 = fadd double %229, 1.000000e+00
%231 = fptosi double %230 to i32
%232 = call double @log(i32 %231)
%233 = fcmp ogt double %232, 0.000000e+00
br i1 %233, label %234, label %287
234: ; preds = %215
%235 = load double, double* %4
%236 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), double %235, double %232)
%237 = load i32, i32* %3
%238 = icmp eq i32 %237, 1
br i1 %238, label %239, label %274
239: ; preds = %234
%240 = icmp eq i32 %216, 0
br i1 %240, label %243, label %241
241: ; preds = %239
%242 = icmp sgt i32 %216, 0
br i1 %242, label %249, label %280
243: ; preds = %239
%244 = load double, double* %4
%245 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %244, double %232)
%246 = load double, double* %7
%247 = load double, double* %4
%248 = fadd double %246, %247
store double %248, double* %4
br label %280
249: ; preds = %241
%250 = load double, double* %4
%251 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %250, double %232)
%252 = fdiv double %217, %232
%253 = fcmp ogt double %252, 2.000000e+00
br i1 %253, label %257, label %254
254: ; preds = %249
%255 = fdiv double %232, %217
%256 = fcmp ogt double %255, 2.000000e+00
br i1 %256, label %257, label %262
257: ; preds = %254, %249
%258 = load double, double* %7
%259 = fmul double %258, 5.000000e-01
%260 = load double, double* %4
%261 = fadd double %260, %259
store double %261, double* %4
br label %280
262: ; preds = %254
%263 = fcmp olt double %252, 5.000000e-01
%264 = fcmp olt double %255, 5.000000e-01
%265 = or i1 %263, %264
%266 = load double, double* %7
%267 = load double, double* %4
%268 = fadd double %266, %267
%269 = call double @llvm.fmuladd.f64(double %266, double 2.000000e+00, double %267)
%270 = select i1 %265, double %269, double %268
store double %270, double* %4
%271 = icmp ugt i32 %216, 1
%272 = select i1 %271, i1 true, i1 %265
%273 = select i1 %272, double %232, double %217
br label %280
274: ; preds = %234
%275 = load double, double* %4
%276 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), double %275, double %232)
%277 = load double, double* %7
%278 = load double, double* %4
%279 = fadd double %277, %278
store double %279, double* %4
br label %280
280: ; preds = %241, %243, %262, %257, %274
%281 = phi double [ %217, %257 ], [ %232, %243 ], [ %217, %274 ], [ %273, %262 ], [ %217, %241 ]
%282 = add nsw i32 %216, 1
%283 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i64 0, i64 0), i32 %282)
%284 = load double, double* %4
%285 = load double, double* %6
%286 = fcmp ugt double %284, %285
br i1 %286, label %292, label %215
287: ; preds = %215, %142, %47, %20
%288 = phi i8* [ getelementptr inbounds ([116 x i8], [116 x i8]* @.str.18, i64 0, i64 0), %20 ], [ getelementptr inbounds ([140 x i8], [140 x i8]* @.str.15, i64 0, i64 0), %47 ], [ getelementptr inbounds ([140 x i8], [140 x i8]* @.str.16, i64 0, i64 0), %142 ], [ getelementptr inbounds ([181 x i8], [181 x i8]* @.str.17, i64 0, i64 0), %215 ]
%289 = phi double [ %17, %20 ], [ %49, %47 ], [ %144, %142 ], [ %217, %215 ]
%290 = phi i32 [ %18, %20 ], [ %48, %47 ], [ %143, %142 ], [ %216, %215 ]
%291 = call i32 @puts(i8* dereferenceable(1) %288)
br label %292
292: ; preds = %280, %208, %135, %287, %35, %39, %43, %15
%293 = phi double [ %17, %15 ], [ %17, %43 ], [ %17, %39 ], [ %17, %35 ], [ %289, %287 ], [ %136, %135 ], [ %209, %208 ], [ %281, %280 ]
%294 = phi i32 [ %18, %15 ], [ %18, %43 ], [ %18, %39 ], [ %18, %35 ], [ %290, %287 ], [ %137, %135 ], [ %210, %208 ], [ %282, %280 ]
%295 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.19, i64 0, i64 0))
%296 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %2)
%297 = load i32, i32* %2
%298 = icmp eq i32 %297, 0
br i1 %298, label %299, label %15
299: ; preds = %292
ret i32 0
}