#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int fscanf(int /*<<< orphan*/ *, char *, ...);
double *malloc(int);
double sqrt(double);
int /*<<< orphan*/ *stderr;
int main(int argc, char *argv[]) {
  if (argc != 5) {
    fprintf(stderr, "Invalid usage\n");
    return -1;
  }
  int status = 0;
  FILE *fid_in_1 = fopen(argv[2], "r");
  FILE *fid_in_2 = fopen(argv[3], "r");
  FILE *fid_out = fopen(argv[4], "w");
  int dimensions_count = 0, samples_count = 1;
  double scale;
  status |= (1 != fscanf(fid_in_1, "%d", &dimensions_count));
  status |= (1 != fscanf(fid_in_2, "%d", &dimensions_count));
  fprintf(fid_out, "%d\n", dimensions_count);
  int inputs_sizes[dimensions_count];
  for (int i = 0; i < dimensions_count; ++i) {
    int inp_size = 0;
    status |= (1 != fscanf(fid_in_1, "%d", &inp_size));
    status |= (1 != fscanf(fid_in_2, "%d", &inp_size));
    inputs_sizes[i] = inp_size;
    fprintf(fid_out, "%d ", inp_size);
    samples_count *= inp_size;
  }
  fprintf(fid_out, "\n");
  for (int i = 0; i < dimensions_count; ++i) {
    double inp_range_start = 0;
    double inp_range_stop = 0;
    status |=
        (1 != fscanf(fid_in_1, "%lf %lf", &inp_range_start, &inp_range_stop));
    status |=
        (1 != fscanf(fid_in_2, "%lf %lf", &inp_range_start, &inp_range_stop));
    fprintf(fid_out, "%lf %lf\n", inp_range_start, inp_range_stop);
  }
  status |= (1 != fscanf(fid_in_1, "%lf", &scale));
  status |= (1 != fscanf(fid_in_2, "%lf", &scale));
  double *points_1 = malloc(sizeof(double) * samples_count);
  double *points_2 = malloc(sizeof(double) * samples_count);
  double *points_out = malloc(sizeof(double) * samples_count);
  double out_min = 100000, out_max = -out_min;
  double mse = 0;
  for (int i = 0; i < samples_count; ++i) {
    status |= (1 != fscanf(fid_in_1, "%lf", &points_1[i]));
    status |= (1 != fscanf(fid_in_2, "%lf", &points_2[i]));
    points_out[i] = ('+' == argv[1][0]) ? (points_1[i] + points_2[i])
                                        : (points_1[i] - points_2[i]);
    if (points_out[i] > out_max) {
      out_max = points_out[i];
    }
    if (points_out[i] < out_min) {
      out_min = points_out[i];
    }
  }
  fprintf(fid_out, "1.0\n");
  if (1 == dimensions_count) {
    for (int i = 0; i < samples_count; ++i) {
      double diff = ('+' == argv[1][0]) ? (points_1[i] + points_2[i])
                                        : (points_1[i] - points_2[i]);
      fprintf(fid_out, "%lf ", diff);
      mse += diff * diff;
    }
    fprintf(fid_out, "\n");
  } else if (2 == dimensions_count) {
    for (int y = 0; y < inputs_sizes[1]; ++y) {
      for (int x = 0; x < inputs_sizes[0]; ++x) {
        int z_idx = y * inputs_sizes[0] + x;
        fprintf(fid_out, "%lf ", points_out[z_idx]);
        double diff = points_1[z_idx] - points_2[z_idx];
        mse += diff * diff;
      }
      fprintf(fid_out, "\n");
    }
  } else if (3 == dimensions_count) {
    for (int y = 0; y < inputs_sizes[1]; ++y) {
      for (int x = 0; x < inputs_sizes[0]; ++x) {
        for (int z = 0; z < inputs_sizes[2]; ++z) {
          int out_idx =
              y * inputs_sizes[0] * inputs_sizes[2] + x * inputs_sizes[2] + z;
          fprintf(fid_out, "%lf ", points_out[out_idx]);
          double diff = points_1[out_idx] - points_2[out_idx];
          mse += diff * diff;
        }
        fprintf(fid_out, "   ");
      }
      fprintf(fid_out, "\n");
    }
  }
  mse /= samples_count;
  mse = sqrt(mse);
  fclose(fid_in_1);
  fclose(fid_in_2);
  fclose(fid_out);
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     11a7 <main+0x47>
mov    0x2e56(%rip),%rax
mov    (%rax),%rdi
lea    0xe74(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1ac6 <main+0x966>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe5a(%rip),%rsi
mov    %rsi,-0x108(%rbp)
call   1070 <fopen@plt>
mov    -0x108(%rbp),%rsi
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1070 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
lea    0xe25(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe05(%rip),%rsi
mov    %rsi,-0x100(%rbp)
xor    %eax,%eax
mov    %al,-0xe9(%rbp)
lea    -0x34(%rbp),%rdx
mov    %rdx,-0xf8(%rbp)
call   1040 <fscanf@plt>
mov    -0x100(%rbp),%rsi
mov    -0xf8(%rbp),%rdx
mov    %eax,%ecx
mov    -0xe9(%rbp),%al
sub    $0x1,%ecx
setne  %cl
movzbl %cl,%edi
mov    -0x14(%rbp),%ecx
or     %edi,%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    -0xe9(%rbp),%al
sub    $0x1,%ecx
setne  %cl
movzbl %cl,%edx
mov    -0x14(%rbp),%ecx
or     %edx,%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%edx
lea    0xd92(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x34(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x48(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xe8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    136e <main+0x20e>
movl   $0x0,-0x58(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xd3b(%rip),%rsi
lea    -0x58(%rbp),%rdx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xd0e(%rip),%rsi
lea    -0x58(%rbp),%rdx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%edx
mov    -0xe8(%rbp),%rax
mov    $0x1,%ecx
cmp    %edx,%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     -0x14(%rbp),%ecx
mov    %ecx,-0x14(%rbp)
mov    -0x58(%rbp),%edx
movslq -0x54(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rdi
mov    -0x58(%rbp),%edx
lea    0xcd3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x58(%rbp),%eax
imul   -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    12c2 <main+0x162>
mov    -0x30(%rbp),%rdi
lea    0xcc1(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    142f <main+0x2cf>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xc78(%rip),%rsi
lea    -0x68(%rbp),%rdx
lea    -0x70(%rbp),%rcx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xc47(%rip),%rsi
lea    -0x68(%rbp),%rdx
lea    -0x70(%rbp),%rcx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%rdi
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
lea    0xc14(%rip),%rsi
mov    $0x2,%al
call   1050 <fprintf@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1387 <main+0x227>
mov    -0x20(%rbp),%rdi
lea    0xbf0(%rip),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xbc3(%rip),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x78(%rbp)
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x88(%rbp)
movsd  0xb33(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x0,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    16b3 <main+0x553>
mov    -0x20(%rbp),%rdi
mov    -0x78(%rbp),%rdx
movslq -0xa4(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xaed(%rip),%rsi
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x80(%rbp),%rdx
movslq -0xa4(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xab2(%rip),%rsi
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%ecx
mov    $0x2b,%eax
cmp    %ecx,%eax
jne    15db <main+0x47b>
mov    -0x78(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xa4(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
jmp    1603 <main+0x4a3>
mov    -0x78(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xa4(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x110(%rbp),%xmm0
ff
mov    -0x88(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x88(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    165a <main+0x4fa>
mov    -0x88(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x88(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    169a <main+0x53a>
mov    -0x88(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    169f <main+0x53f>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1511 <main+0x3b1>
mov    -0x30(%rbp),%rdi
lea    0x979(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%eax
cmp    -0x34(%rbp),%eax
jne    17d6 <main+0x676>
movl   $0x0,-0xa8(%rbp)
mov    -0xa8(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    17bf <main+0x65f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%ecx
mov    $0x2b,%eax
cmp    %ecx,%eax
jne    1731 <main+0x5d1>
mov    -0x78(%rbp),%rax
movslq -0xa8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xa8(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
jmp    1759 <main+0x5f9>
mov    -0x78(%rbp),%rax
movslq -0xa8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xa8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x118(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x30(%rbp),%rdi
movsd  -0xb0(%rbp),%xmm0
ff
lea    0x8c0(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0xa8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa8(%rbp)
jmp    16dd <main+0x57d>
mov    -0x30(%rbp),%rdi
lea    0x870(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1a70 <main+0x910>
mov    $0x2,%eax
cmp    -0x34(%rbp),%eax
jne    18f3 <main+0x793>
movl   $0x0,-0xb4(%rbp)
mov    -0xe8(%rbp),%rcx
mov    -0xb4(%rbp),%eax
cmp    0x4(%rcx),%eax
jge    18ee <main+0x78e>
movl   $0x0,-0xb8(%rbp)
mov    -0xe8(%rbp),%rcx
mov    -0xb8(%rbp),%eax
cmp    (%rcx),%eax
jge    18c8 <main+0x768>
mov    -0xe8(%rbp),%rcx
mov    -0xb4(%rbp),%eax
imul   (%rcx),%eax
add    -0xb8(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x88(%rbp),%rax
movslq -0xbc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x7df(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x78(%rbp),%rax
movslq -0xbc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xbc(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    180e <main+0x6ae>
mov    -0x30(%rbp),%rdi
lea    0x767(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    17ee <main+0x68e>
jmp    1a6b <main+0x90b>
mov    $0x3,%eax
cmp    -0x34(%rbp),%eax
jne    1a66 <main+0x906>
movl   $0x0,-0xcc(%rbp)
mov    -0xe8(%rbp),%rcx
mov    -0xcc(%rbp),%eax
cmp    0x4(%rcx),%eax
jge    1a61 <main+0x901>
movl   $0x0,-0xd0(%rbp)
mov    -0xe8(%rbp),%rcx
mov    -0xd0(%rbp),%eax
cmp    (%rcx),%eax
jge    1a3b <main+0x8db>
movl   $0x0,-0xd4(%rbp)
mov    -0xe8(%rbp),%rcx
mov    -0xd4(%rbp),%eax
cmp    0x8(%rcx),%eax
jge    1a15 <main+0x8b5>
mov    -0xe8(%rbp),%rdx
mov    -0xcc(%rbp),%eax
imul   (%rdx),%eax
imul   0x8(%rdx),%eax
mov    -0xd0(%rbp),%ecx
imul   0x8(%rdx),%ecx
add    %ecx,%eax
add    -0xd4(%rbp),%eax
mov    %eax,-0xd8(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x88(%rbp),%rax
movslq -0xd8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0x692(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x78(%rbp),%rax
movslq -0xd8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0xd8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    194a <main+0x7ea>
mov    -0x30(%rbp),%rdi
lea    0x621(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xd0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd0(%rbp)
jmp    192b <main+0x7cb>
mov    -0x30(%rbp),%rdi
lea    0x5f4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
jmp    190b <main+0x7ab>
jmp    1a66 <main+0x906>
jmp    1a6b <main+0x90b>
jmp    1a70 <main+0x910>
cvtsi2sdl -0x38(%rbp),%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1080 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
cmp    $0x5,%edi
jne    14da <main+0x35a>
mov    0x10(%rsi),%rdi
mov    %rsi,%r14
lea    0xe74(%rip),%rbx
mov    %rbx,%rsi
call   1080 <fopen@plt>
mov    0x18(%r14),%rdi
mov    %rbx,%rsi
mov    %rax,%rbx
call   1080 <fopen@plt>
mov    %rax,%r13
mov    %r14,-0x48(%rbp)
mov    0x20(%r14),%rdi
lea    0xe4d(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r14
movl   $0x0,-0x34(%rbp)
lea    0xe39(%rip),%rsi
lea    -0x34(%rbp),%r15
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
mov    %eax,%r12d
xor    $0x1,%r12d
mov    %r13,-0x68(%rbp)
mov    %r13,%rdi
lea    0xe13(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    $0x1,%eax
xor    %r13d,%r13d
or     %r12d,%eax
setne  %r13b
mov    -0x34(%rbp),%edx
lea    0xdf5(%rip),%rsi
mov    %r14,-0x40(%rbp)
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %rsp,-0xc8(%rbp)
mov    -0x34(%rbp),%eax
mov    %rsp,%rcx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
cmpl   $0x0,-0x34(%rbp)
mov    %rbx,-0x80(%rbp)
mov    $0x1,%r15d
jle    12fc <main+0x17c>
xor    %r12d,%r12d
nopl   0x0(%rax)
movl   $0x0,-0x50(%rbp)
mov    %rbx,%rdi
lea    0xd92(%rip),%r14
mov    %r14,%rsi
lea    -0x50(%rbp),%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
setne  %bl
or     %r13d,%ebx
mov    -0x68(%rbp),%rdi
mov    %r14,%rsi
lea    -0x50(%rbp),%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %r13d,%r13d
cmp    $0x1,%eax
setne  %r13b
or     %ebx,%r13d
mov    -0x80(%rbp),%rbx
mov    -0x50(%rbp),%edx
mov    -0x78(%rbp),%rax
mov    %edx,(%rax,%r12,4)
mov    -0x40(%rbp),%rdi
lea    0xd47(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
imul   -0x50(%rbp),%r15d
add    $0x1,%r12
movslq -0x34(%rbp),%rax
cmp    %rax,%r12
jl     1280 <main+0x100>
mov    %r15,-0x88(%rbp)
mov    $0xa,%edi
mov    -0x40(%rbp),%rsi
call   1050 <fputc@plt>
cmpl   $0x0,-0x34(%rbp)
jle    13b6 <main+0x236>
xor    %r14d,%r14d
xchg   %ax,%ax
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0xa0(%rbp)
mov    %rbx,%rdi
lea    0xcf1(%rip),%r12
mov    %r12,%rsi
lea    -0x50(%rbp),%r15
mov    %r15,%rdx
lea    -0xa0(%rbp),%rcx
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
setne  %bl
or     %r13d,%ebx
mov    -0x68(%rbp),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
lea    -0xa0(%rbp),%rcx
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %r13d,%r13d
cmp    $0x1,%eax
setne  %r13b
or     %ebx,%r13d
mov    -0x80(%rbp),%rbx
movsd  -0x50(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm1
ff
mov    -0x40(%rbp),%rdi
lea    0xc95(%rip),%rsi
mov    $0x2,%al
call   1060 <fprintf@plt>
add    $0x1,%r14d
cmp    -0x34(%rbp),%r14d
jl     1320 <main+0x1a0>
lea    0xc75(%rip),%r14
lea    -0x50(%rbp),%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
setne  %bl
mov    -0x68(%rbp),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %r12d,%r12d
cmp    $0x1,%eax
setne  %r12b
or     %ebx,%r12d
or     %r13d,%r12d
mov    -0x88(%rbp),%rbx
lea    0x0(,%rbx,8),%r15d
mov    %r15d,%edi
call   1070 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    %r15d,%edi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    %r15d,%edi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
test   %ebx,%ebx
jle    1504 <main+0x384>
mov    %ebx,%eax
shl    $0x3,%rax
mov    %rax,-0x30(%rbp)
xor    %r15d,%r15d
mov    -0x80(%rbp),%r13
mov    -0x70(%rbp),%rax
jmp    1479 <main+0x2f9>
nopl   0x0(%rax)
mov    -0x58(%rbp),%rdx
mov    %al,%cl
mov    -0x70(%rbp),%rax
addsd  (%rax,%r15,1),%xmm0
or     %ecx,%ebx
movsd  %xmm0,(%rdx,%r15,1)
add    $0x8,%r15
mov    %ebx,%r12d
cmp    %r15,-0x30(%rbp)
je     1507 <main+0x387>
lea    (%rax,%r15,1),%rdx
mov    %r13,%rdi
lea    0xbab(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
setne  %bl
or     %r12d,%ebx
mov    -0x60(%rbp),%r12
lea    (%r12,%r15,1),%rdx
mov    -0x68(%rbp),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <fscanf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %al
mov    -0x48(%rbp),%rdx
mov    0x8(%rdx),%rdx
cmpb   $0x2b,(%rdx)
movsd  (%r12,%r15,1),%xmm0
je     1450 <main+0x2d0>
xorpd  0xb2b(%rip),%xmm0
jmp    1450 <main+0x2d0>
mov    0x2aff(%rip),%rax
mov    (%rax),%rcx
lea    0xb25(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
call   10a0 <fwrite@plt>
mov    $0xffffffff,%eax
jmp    18ae <main+0x72e>
mov    %r12d,%ebx
mov    %ebx,-0xa4(%rbp)
lea    0xb2b(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    -0x40(%rbp),%r15
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    -0x34(%rbp),%eax
cmp    $0x1,%eax
je     16bf <main+0x53f>
cmp    $0x2,%eax
mov    -0x70(%rbp),%r13
xorpd  %xmm0,%xmm0
je     1751 <main+0x5d1>
movsd  %xmm0,-0x30(%rbp)
cmp    $0x3,%eax
mov    -0x78(%rbp),%rax
jne    1869 <main+0x6e9>
mov    0x4(%rax),%ecx
mov    %ecx,-0xa8(%rbp)
test   %ecx,%ecx
jle    1869 <main+0x6e9>
mov    (%rax),%ebx
xorpd  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xor    %ecx,%ecx
xor    %edx,%edx
mov    %rbx,-0x90(%rbp)
jmp    15bf <main+0x43f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
mov    -0xac(%rbp),%edx
add    $0x1,%edx
mov    -0xd0(%rbp),%rcx
add    %ebx,%ecx
cmp    -0xa8(%rbp),%edx
mov    -0x78(%rbp),%rax
je     1869 <main+0x6e9>
test   %ebx,%ebx
mov    %rcx,-0xd0(%rbp)
mov    %edx,-0xac(%rbp)
jle    1590 <main+0x410>
mov    0x8(%rax),%eax
mov    %eax,%edx
imul   %ecx,%edx
xor    %ecx,%ecx
mov    %rax,-0x48(%rbp)
jmp    1635 <main+0x4b5>
mov    -0x40(%rbp),%rbx
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xa4a(%rip),%rdi
mov    %rbx,%r15
mov    %rbx,%rcx
call   10a0 <fwrite@plt>
mov    -0x98(%rbp),%rcx
add    $0x1,%rcx
mov    -0xc0(%rbp),%edx
mov    -0x48(%rbp),%rax
add    %eax,%edx
mov    -0x90(%rbp),%rbx
cmp    %rbx,%rcx
mov    -0x70(%rbp),%r13
je     1590 <main+0x410>
mov    %rcx,-0x98(%rbp)
test   %eax,%eax
mov    %edx,-0xc0(%rbp)
jle    15e0 <main+0x460>
movslq %edx,%rax
mov    -0x58(%rbp),%rcx
lea    (%rcx,%rax,8),%r14
lea    0x0(,%rax,8),%r15
add    %r13,%r15
mov    -0x60(%rbp),%rcx
lea    (%rcx,%rax,8),%r13
xor    %r12d,%r12d
mov    -0x40(%rbp),%rbx
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  (%r14,%r12,8),%xmm0
mov    %rbx,%rdi
lea    0x9bf(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
movsd  (%r15,%r12,8),%xmm0
subsd  0x0(%r13,%r12,8),%xmm0
mulsd  %xmm0,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x1,%r12
cmp    %r12,-0x48(%rbp)
jne    1670 <main+0x4f0>
jmp    15e9 <main+0x469>
mov    -0x88(%rbp),%rax
test   %eax,%eax
mov    -0x60(%rbp),%r13
jle    184f <main+0x6cf>
mov    %eax,%r14d
xorpd  %xmm1,%xmm1
xor    %r12d,%r12d
lea    0x961(%rip),%r15
mov    -0x48(%rbp),%rbx
jmp    1732 <main+0x5b2>
nopl   0x0(%rax)
mov    -0x70(%rbp),%rax
addsd  (%rax,%r12,8),%xmm0
movapd %xmm0,-0xc0(%rbp)
ff
mov    -0x40(%rbp),%rdi
mov    %r15,%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
movapd -0xc0(%rbp),%xmm0
ff
mulsd  %xmm0,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm0,%xmm1
add    $0x1,%r12
cmp    %r12,%r14
je     1853 <main+0x6d3>
mov    0x8(%rbx),%rax
cmpb   $0x2b,(%rax)
movsd  0x0(%r13,%r12,8),%xmm0
movsd  %xmm1,-0x30(%rbp)
je     16f0 <main+0x570>
xorpd  0x8b1(%rip),%xmm0
jmp    16f0 <main+0x570>
movsd  %xmm0,-0x30(%rbp)
mov    -0x78(%rbp),%rax
mov    0x4(%rax),%ecx
mov    %rcx,-0x98(%rbp)
test   %ecx,%ecx
jle    1869 <main+0x6e9>
mov    (%rax),%eax
movslq %eax,%rcx
shl    $0x3,%rcx
mov    %rcx,-0x90(%rbp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xor    %ecx,%ecx
mov    %rax,-0x48(%rbp)
jmp    17e3 <main+0x663>
nopl   (%rax)
mov    -0x60(%rbp),%r14
mov    -0x58(%rbp),%r12
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0xa,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
mov    -0xc0(%rbp),%rcx
add    $0x1,%rcx
mov    -0x90(%rbp),%rax
add    %rax,%r12
mov    %r12,-0x58(%rbp)
add    %rax,%r13
add    %rax,%r14
mov    %r14,-0x60(%rbp)
cmp    -0x98(%rbp),%rcx
mov    -0x48(%rbp),%rax
je     1869 <main+0x6e9>
test   %eax,%eax
mov    %rcx,-0xc0(%rbp)
jle    1790 <main+0x610>
xor    %ebx,%ebx
mov    -0x60(%rbp),%r14
mov    -0x58(%rbp),%r12
movsd  -0x30(%rbp),%xmm0
nopl   (%rax)
movsd  %xmm0,-0x30(%rbp)
movsd  (%r12,%rbx,8),%xmm0
mov    %r15,%rdi
lea    0x82f(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
movsd  0x0(%r13,%rbx,8),%xmm0
subsd  (%r14,%rbx,8),%xmm0
mulsd  %xmm0,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x1,%rbx
cmp    %rbx,-0x48(%rbp)
jne    1800 <main+0x680>
jmp    179d <main+0x61d>
xorpd  %xmm1,%xmm1
movsd  %xmm1,-0x30(%rbp)
mov    $0xa,%edi
mov    -0x40(%rbp),%r15
mov    %r15,%rsi
call   1050 <fputc@plt>
xorps  %xmm1,%xmm1
cvtsi2sdl -0x88(%rbp),%xmm1
ff
movsd  -0x30(%rbp),%xmm0
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     18bd <main+0x73d>
mov    -0x80(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x68(%rbp),%rdi
call   1030 <fclose@plt>
mov    %r15,%rdi
call   1030 <fclose@plt>
mov    -0xc8(%rbp),%rsp
mov    -0xa4(%rbp),%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
ucomisd %xmm1,%xmm0
jae    1887 <main+0x707>
call   1090 <sqrt@plt>
jmp    1887 <main+0x707>

LLVM IR (-O0):
@stderr = global i32* null
@.str = [15 x i8] c"Invalid usage\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [4 x i8] c"%d\0A\00"
@.str.5 = [4 x i8] c"%d \00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [8 x i8] c"%lf %lf\00"
@.str.8 = [9 x i8] c"%lf %lf\0A\00"
@.str.9 = [4 x i8] c"%lf\00"
@.str.10 = [5 x i8] c"1.0\0A\00"
@.str.11 = [5 x i8] c"%lf \00"
@.str.12 = [4 x i8] c" \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%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 i32
%27 = alloca i32
%28 = alloca double
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca double
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%38 = load i32, i32* %4
%39 = icmp ne i32 %38, 5
br i1 %39, label %40, label %43
40: ; preds = %2
%41 = load i32*, i32** @stderr
%42 = call i32 (i32*, i8*, ...) @fprintf(i32* %41, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %457
43: ; preds = %2
store i32 0, i32* %6
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 2
%46 = load i8*, i8** %45
%47 = call i32* @fopen(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %47, i32** %7
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 3
%50 = load i8*, i8** %49
%51 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %51, i32** %8
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 4
%54 = load i8*, i8** %53
%55 = call i32* @fopen(i8* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %55, i32** %9
store i32 0, i32* %10
store i32 1, i32* %11
%56 = load i32*, i32** %7
%57 = call i32 (i32*, i8*, ...) @fscanf(i32* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %10)
%58 = icmp ne i32 1, %57
%59 = zext i1 %58 to i32
%60 = load i32, i32* %6
%61 = or i32 %60, %59
store i32 %61, i32* %6
%62 = load i32*, i32** %8
%63 = call i32 (i32*, i8*, ...) @fscanf(i32* %62, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %10)
%64 = icmp ne i32 1, %63
%65 = zext i1 %64 to i32
%66 = load i32, i32* %6
%67 = or i32 %66, %65
store i32 %67, i32* %6
%68 = load i32*, i32** %9
%69 = load i32, i32* %10
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %69)
%71 = load i32, i32* %10
%72 = zext i32 %71 to i64
%73 = call i8* @llvm.stacksave()
store i8* %73, i8** %13
%74 = alloca i32, i64 %72
store i64 %72, i64* %14
store i32 0, i32* %15
br label %75
75: ; preds = %102, %43
%76 = load i32, i32* %15
%77 = load i32, i32* %10
%78 = icmp slt i32 %76, %77
br i1 %78, label %79, label %105
79: ; preds = %75
store i32 0, i32* %16
%80 = load i32*, i32** %7
%81 = call i32 (i32*, i8*, ...) @fscanf(i32* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %16)
%82 = icmp ne i32 1, %81
%83 = zext i1 %82 to i32
%84 = load i32, i32* %6
%85 = or i32 %84, %83
store i32 %85, i32* %6
%86 = load i32*, i32** %8
%87 = call i32 (i32*, i8*, ...) @fscanf(i32* %86, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %16)
%88 = icmp ne i32 1, %87
%89 = zext i1 %88 to i32
%90 = load i32, i32* %6
%91 = or i32 %90, %89
store i32 %91, i32* %6
%92 = load i32, i32* %16
%93 = load i32, i32* %15
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i32, i32* %74, i64 %94
store i32 %92, i32* %95
%96 = load i32*, i32** %9
%97 = load i32, i32* %16
%98 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %97)
%99 = load i32, i32* %16
%100 = load i32, i32* %11
%101 = mul nsw i32 %100, %99
store i32 %101, i32* %11
br label %102
102: ; preds = %79
%103 = load i32, i32* %15
%104 = add nsw i32 %103, 1
store i32 %104, i32* %15
br label %75
105: ; preds = %75
%106 = load i32*, i32** %9
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %17
br label %108
108: ; preds = %129, %105
%109 = load i32, i32* %17
%110 = load i32, i32* %10
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %132
112: ; preds = %108
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
%113 = load i32*, i32** %7
%114 = call i32 (i32*, i8*, ...) @fscanf(i32* %113, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), double* %18, double* %19)
%115 = icmp ne i32 1, %114
%116 = zext i1 %115 to i32
%117 = load i32, i32* %6
%118 = or i32 %117, %116
store i32 %118, i32* %6
%119 = load i32*, i32** %8
%120 = call i32 (i32*, i8*, ...) @fscanf(i32* %119, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), double* %18, double* %19)
%121 = icmp ne i32 1, %120
%122 = zext i1 %121 to i32
%123 = load i32, i32* %6
%124 = or i32 %123, %122
store i32 %124, i32* %6
%125 = load i32*, i32** %9
%126 = load double, double* %18
%127 = load double, double* %19
%128 = call i32 (i32*, i8*, ...) @fprintf(i32* %125, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), double %126, double %127)
br label %129
129: ; preds = %112
%130 = load i32, i32* %17
%131 = add nsw i32 %130, 1
store i32 %131, i32* %17
br label %108
132: ; preds = %108
%133 = load i32*, i32** %7
%134 = call i32 (i32*, i8*, ...) @fscanf(i32* %133, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %12)
%135 = icmp ne i32 1, %134
%136 = zext i1 %135 to i32
%137 = load i32, i32* %6
%138 = or i32 %137, %136
store i32 %138, i32* %6
%139 = load i32*, i32** %8
%140 = call i32 (i32*, i8*, ...) @fscanf(i32* %139, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %12)
%141 = icmp ne i32 1, %140
%142 = zext i1 %141 to i32
%143 = load i32, i32* %6
%144 = or i32 %143, %142
store i32 %144, i32* %6
%145 = load i32, i32* %11
%146 = sext i32 %145 to i64
%147 = mul i64 8, %146
%148 = trunc i64 %147 to i32
%149 = call double* @malloc(i32 %148)
store double* %149, double** %20
%150 = load i32, i32* %11
%151 = sext i32 %150 to i64
%152 = mul i64 8, %151
%153 = trunc i64 %152 to i32
%154 = call double* @malloc(i32 %153)
store double* %154, double** %21
%155 = load i32, i32* %11
%156 = sext i32 %155 to i64
%157 = mul i64 8, %156
%158 = trunc i64 %157 to i32
%159 = call double* @malloc(i32 %158)
store double* %159, double** %22
store double 1.000000e+05, double* %23
%160 = load double, double* %23
%161 = fneg double %160
store double %161, double* %24
store double 0.000000e+00, double* %25
store i32 0, i32* %26
br label %162
162: ; preds = %252, %132
%163 = load i32, i32* %26
%164 = load i32, i32* %11
%165 = icmp slt i32 %163, %164
br i1 %165, label %166, label %255
166: ; preds = %162
%167 = load i32*, i32** %7
%168 = load double*, double** %20
%169 = load i32, i32* %26
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds double, double* %168, i64 %170
%172 = call i32 (i32*, i8*, ...) @fscanf(i32* %167, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %171)
%173 = icmp ne i32 1, %172
%174 = zext i1 %173 to i32
%175 = load i32, i32* %6
%176 = or i32 %175, %174
store i32 %176, i32* %6
%177 = load i32*, i32** %8
%178 = load double*, double** %21
%179 = load i32, i32* %26
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %178, i64 %180
%182 = call i32 (i32*, i8*, ...) @fscanf(i32* %177, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %181)
%183 = icmp ne i32 1, %182
%184 = zext i1 %183 to i32
%185 = load i32, i32* %6
%186 = or i32 %185, %184
store i32 %186, i32* %6
%187 = load i8**, i8*** %5
%188 = getelementptr inbounds i8*, i8** %187, i64 1
%189 = load i8*, i8** %188
%190 = getelementptr inbounds i8, i8* %189, i64 0
%191 = load i8, i8* %190
%192 = sext i8 %191 to i32
%193 = icmp eq i32 43, %192
br i1 %193, label %194, label %206
194: ; preds = %166
%195 = load double*, double** %20
%196 = load i32, i32* %26
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds double, double* %195, i64 %197
%199 = load double, double* %198
%200 = load double*, double** %21
%201 = load i32, i32* %26
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %200, i64 %202
%204 = load double, double* %203
%205 = fadd double %199, %204
br label %218
206: ; preds = %166
%207 = load double*, double** %20
%208 = load i32, i32* %26
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds double, double* %207, i64 %209
%211 = load double, double* %210
%212 = load double*, double** %21
%213 = load i32, i32* %26
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %212, i64 %214
%216 = load double, double* %215
%217 = fsub double %211, %216
br label %218
218: ; preds = %206, %194
%219 = phi double [ %205, %194 ], [ %217, %206 ]
%220 = load double*, double** %22
%221 = load i32, i32* %26
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds double, double* %220, i64 %222
store double %219, double* %223
%224 = load double*, double** %22
%225 = load i32, i32* %26
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double, double* %224, i64 %226
%228 = load double, double* %227
%229 = load double, double* %24
%230 = fcmp ogt double %228, %229
br i1 %230, label %231, label %237
231: ; preds = %218
%232 = load double*, double** %22
%233 = load i32, i32* %26
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %232, i64 %234
%236 = load double, double* %235
store double %236, double* %24
br label %237
237: ; preds = %231, %218
%238 = load double*, double** %22
%239 = load i32, i32* %26
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds double, double* %238, i64 %240
%242 = load double, double* %241
%243 = load double, double* %23
%244 = fcmp olt double %242, %243
br i1 %244, label %245, label %251
245: ; preds = %237
%246 = load double*, double** %22
%247 = load i32, i32* %26
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds double, double* %246, i64 %248
%250 = load double, double* %249
store double %250, double* %23
br label %251
251: ; preds = %245, %237
br label %252
252: ; preds = %251
%253 = load i32, i32* %26
%254 = add nsw i32 %253, 1
store i32 %254, i32* %26
br label %162
255: ; preds = %162
%256 = load i32*, i32** %9
%257 = call i32 (i32*, i8*, ...) @fprintf(i32* %256, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%258 = load i32, i32* %10
%259 = icmp eq i32 1, %258
br i1 %259, label %260, label %312
260: ; preds = %255
store i32 0, i32* %27
br label %261
261: ; preds = %306, %260
%262 = load i32, i32* %27
%263 = load i32, i32* %11
%264 = icmp slt i32 %262, %263
br i1 %264, label %265, label %309
265: ; preds = %261
%266 = load i8**, i8*** %5
%267 = getelementptr inbounds i8*, i8** %266, i64 1
%268 = load i8*, i8** %267
%269 = getelementptr inbounds i8, i8* %268, i64 0
%270 = load i8, i8* %269
%271 = sext i8 %270 to i32
%272 = icmp eq i32 43, %271
br i1 %272, label %273, label %285
273: ; preds = %265
%274 = load double*, double** %20
%275 = load i32, i32* %27
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds double, double* %274, i64 %276
%278 = load double, double* %277
%279 = load double*, double** %21
%280 = load i32, i32* %27
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds double, double* %279, i64 %281
%283 = load double, double* %282
%284 = fadd double %278, %283
br label %297
285: ; preds = %265
%286 = load double*, double** %20
%287 = load i32, i32* %27
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds double, double* %286, i64 %288
%290 = load double, double* %289
%291 = load double*, double** %21
%292 = load i32, i32* %27
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds double, double* %291, i64 %293
%295 = load double, double* %294
%296 = fsub double %290, %295
br label %297
297: ; preds = %285, %273
%298 = phi double [ %284, %273 ], [ %296, %285 ]
store double %298, double* %28
%299 = load i32*, i32** %9
%300 = load double, double* %28
%301 = call i32 (i32*, i8*, ...) @fprintf(i32* %299, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), double %300)
%302 = load double, double* %28
%303 = load double, double* %28
%304 = load double, double* %25
%305 = call double @llvm.fmuladd.f64(double %302, double %303, double %304)
store double %305, double* %25
br label %306
306: ; preds = %297
%307 = load i32, i32* %27
%308 = add nsw i32 %307, 1
store i32 %308, i32* %27
br label %261
309: ; preds = %261
%310 = load i32*, i32** %9
%311 = call i32 (i32*, i8*, ...) @fprintf(i32* %310, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %442
312: ; preds = %255
%313 = load i32, i32* %10
%314 = icmp eq i32 2, %313
br i1 %314, label %315, label %366
315: ; preds = %312
store i32 0, i32* %29
br label %316
316: ; preds = %362, %315
%317 = load i32, i32* %29
%318 = getelementptr inbounds i32, i32* %74, i64 1
%319 = load i32, i32* %318
%320 = icmp slt i32 %317, %319
br i1 %320, label %321, label %365
321: ; preds = %316
store i32 0, i32* %30
br label %322
322: ; preds = %356, %321
%323 = load i32, i32* %30
%324 = getelementptr inbounds i32, i32* %74, i64 0
%325 = load i32, i32* %324
%326 = icmp slt i32 %323, %325
br i1 %326, label %327, label %359
327: ; preds = %322
%328 = load i32, i32* %29
%329 = getelementptr inbounds i32, i32* %74, i64 0
%330 = load i32, i32* %329
%331 = mul nsw i32 %328, %330
%332 = load i32, i32* %30
%333 = add nsw i32 %331, %332
store i32 %333, i32* %31
%334 = load i32*, i32** %9
%335 = load double*, double** %22
%336 = load i32, i32* %31
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds double, double* %335, i64 %337
%339 = load double, double* %338
%340 = call i32 (i32*, i8*, ...) @fprintf(i32* %334, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), double %339)
%341 = load double*, double** %20
%342 = load i32, i32* %31
%343 = sext i32 %342 to i64
%344 = getelementptr inbounds double, double* %341, i64 %343
%345 = load double, double* %344
%346 = load double*, double** %21
%347 = load i32, i32* %31
%348 = sext i32 %347 to i64
%349 = getelementptr inbounds double, double* %346, i64 %348
%350 = load double, double* %349
%351 = fsub double %345, %350
store double %351, double* %32
%352 = load double, double* %32
%353 = load double, double* %32
%354 = load double, double* %25
%355 = call double @llvm.fmuladd.f64(double %352, double %353, double %354)
store double %355, double* %25
br label %356
356: ; preds = %327
%357 = load i32, i32* %30
%358 = add nsw i32 %357, 1
store i32 %358, i32* %30
br label %322
359: ; preds = %322
%360 = load i32*, i32** %9
%361 = call i32 (i32*, i8*, ...) @fprintf(i32* %360, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %362
362: ; preds = %359
%363 = load i32, i32* %29
%364 = add nsw i32 %363, 1
store i32 %364, i32* %29
br label %316
365: ; preds = %316
br label %441
366: ; preds = %312
%367 = load i32, i32* %10
%368 = icmp eq i32 3, %367
br i1 %368, label %369, label %440
369: ; preds = %366
store i32 0, i32* %33
br label %370
370: ; preds = %436, %369
%371 = load i32, i32* %33
%372 = getelementptr inbounds i32, i32* %74, i64 1
%373 = load i32, i32* %372
%374 = icmp slt i32 %371, %373
br i1 %374, label %375, label %439
375: ; preds = %370
store i32 0, i32* %34
br label %376
376: ; preds = %430, %375
%377 = load i32, i32* %34
%378 = getelementptr inbounds i32, i32* %74, i64 0
%379 = load i32, i32* %378
%380 = icmp slt i32 %377, %379
br i1 %380, label %381, label %433
381: ; preds = %376
store i32 0, i32* %35
br label %382
382: ; preds = %424, %381
%383 = load i32, i32* %35
%384 = getelementptr inbounds i32, i32* %74, i64 2
%385 = load i32, i32* %384
%386 = icmp slt i32 %383, %385
br i1 %386, label %387, label %427
387: ; preds = %382
%388 = load i32, i32* %33
%389 = getelementptr inbounds i32, i32* %74, i64 0
%390 = load i32, i32* %389
%391 = mul nsw i32 %388, %390
%392 = getelementptr inbounds i32, i32* %74, i64 2
%393 = load i32, i32* %392
%394 = mul nsw i32 %391, %393
%395 = load i32, i32* %34
%396 = getelementptr inbounds i32, i32* %74, i64 2
%397 = load i32, i32* %396
%398 = mul nsw i32 %395, %397
%399 = add nsw i32 %394, %398
%400 = load i32, i32* %35
%401 = add nsw i32 %399, %400
store i32 %401, i32* %36
%402 = load i32*, i32** %9
%403 = load double*, double** %22
%404 = load i32, i32* %36
%405 = sext i32 %404 to i64
%406 = getelementptr inbounds double, double* %403, i64 %405
%407 = load double, double* %406
%408 = call i32 (i32*, i8*, ...) @fprintf(i32* %402, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), double %407)
%409 = load double*, double** %20
%410 = load i32, i32* %36
%411 = sext i32 %410 to i64
%412 = getelementptr inbounds double, double* %409, i64 %411
%413 = load double, double* %412
%414 = load double*, double** %21
%415 = load i32, i32* %36
%416 = sext i32 %415 to i64
%417 = getelementptr inbounds double, double* %414, i64 %416
%418 = load double, double* %417
%419 = fsub double %413, %418
store double %419, double* %37
%420 = load double, double* %37
%421 = load double, double* %37
%422 = load double, double* %25
%423 = call double @llvm.fmuladd.f64(double %420, double %421, double %422)
store double %423, double* %25
br label %424
424: ; preds = %387
%425 = load i32, i32* %35
%426 = add nsw i32 %425, 1
store i32 %426, i32* %35
br label %382
427: ; preds = %382
%428 = load i32*, i32** %9
%429 = call i32 (i32*, i8*, ...) @fprintf(i32* %428, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
br label %430
430: ; preds = %427
%431 = load i32, i32* %34
%432 = add nsw i32 %431, 1
store i32 %432, i32* %34
br label %376
433: ; preds = %376
%434 = load i32*, i32** %9
%435 = call i32 (i32*, i8*, ...) @fprintf(i32* %434, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %436
436: ; preds = %433
%437 = load i32, i32* %33
%438 = add nsw i32 %437, 1
store i32 %438, i32* %33
br label %370
439: ; preds = %370
br label %440
440: ; preds = %439, %366
br label %441
441: ; preds = %440, %365
br label %442
442: ; preds = %441, %309
%443 = load i32, i32* %11
%444 = sitofp i32 %443 to double
%445 = load double, double* %25
%446 = fdiv double %445, %444
store double %446, double* %25
%447 = load double, double* %25
%448 = call double @sqrt(double %447)
store double %448, double* %25
%449 = load i32*, i32** %7
%450 = call i32 @fclose(i32* %449)
%451 = load i32*, i32** %8
%452 = call i32 @fclose(i32* %451)
%453 = load i32*, i32** %9
%454 = call i32 @fclose(i32* %453)
%455 = load i32, i32* %6
store i32 %455, i32* %3
%456 = load i8*, i8** %13
br label %457
457: ; preds = %442, %40
%458 = load i32, i32* %3
ret i32 %458
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [15 x i8] c"Invalid usage\0A\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [4 x i8] c"%d\0A\00"
@.str.5 = [4 x i8] c"%d \00"
@.str.7 = [8 x i8] c"%lf %lf\00"
@.str.8 = [9 x i8] c"%lf %lf\0A\00"
@.str.9 = [4 x i8] c"%lf\00"
@.str.10 = [5 x i8] c"1.0\0A\00"
@.str.11 = [5 x i8] c"%lf \00"
@.str.12 = [4 x i8] c" \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = icmp eq i32 %0, 5
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32*, i32** @stderr
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 14, i64 1, i32* %10)
br label %253
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = getelementptr inbounds i8*, i8** %1, i64 3
%17 = load i8*, i8** %16
%18 = tail call i32* @fopen(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = getelementptr inbounds i8*, i8** %1, i64 4
%20 = load i8*, i8** %19
%21 = tail call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%22 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%23 = bitcast double* %4 to i8*
%24 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%25 = icmp ne i32 %24, 1
%26 = call i32 (i32*, i8*, ...) @fscanf(i32* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%27 = icmp ne i32 %26, 1
%28 = or i1 %25, %27
%29 = zext i1 %28 to i32
%30 = load i32, i32* %3
%31 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %3
%33 = zext i32 %32 to i64
%34 = call i8* @llvm.stacksave()
%35 = alloca i32, i64 %33
%36 = load i32, i32* %3
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %12
%39 = bitcast i32* %5 to i8*
br label %49
40: ; preds = %49, %12
%41 = phi i32 [ 1, %12 ], [ %65, %49 ]
%42 = phi i32 [ %29, %12 ], [ %60, %49 ]
%43 = call i32 @fputc(i32 10, i32* %21)
%44 = load i32, i32* %3
%45 = icmp sgt i32 %44, 0
br i1 %45, label %46, label %70
46: ; preds = %40
%47 = bitcast double* %6 to i8*
%48 = bitcast double* %7 to i8*
br label %88
49: ; preds = %38, %49
%50 = phi i64 [ 0, %38 ], [ %66, %49 ]
%51 = phi i32 [ %29, %38 ], [ %60, %49 ]
%52 = phi i32 [ 1, %38 ], [ %65, %49 ]
store i32 0, i32* %5
%53 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%54 = icmp ne i32 %53, 1
%55 = zext i1 %54 to i32
%56 = or i32 %51, %55
%57 = call i32 (i32*, i8*, ...) @fscanf(i32* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%58 = icmp ne i32 %57, 1
%59 = zext i1 %58 to i32
%60 = or i32 %56, %59
%61 = load i32, i32* %5
%62 = getelementptr inbounds i32, i32* %35, i64 %50
store i32 %61, i32* %62
%63 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %61)
%64 = load i32, i32* %5
%65 = mul nsw i32 %64, %52
%66 = add nuw nsw i64 %50, 1
%67 = load i32, i32* %3
%68 = sext i32 %67 to i64
%69 = icmp slt i64 %66, %68
br i1 %69, label %49, label %40
70: ; preds = %88, %40
%71 = phi i32 [ %42, %40 ], [ %98, %88 ]
%72 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %4)
%73 = icmp ne i32 %72, 1
%74 = zext i1 %73 to i32
%75 = or i32 %71, %74
%76 = call i32 (i32*, i8*, ...) @fscanf(i32* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %4)
%77 = icmp ne i32 %76, 1
%78 = zext i1 %77 to i32
%79 = or i32 %75, %78
%80 = shl i32 %41, 3
%81 = call double* @malloc(i32 %80)
%82 = call double* @malloc(i32 %80)
%83 = call double* @malloc(i32 %80)
%84 = icmp sgt i32 %41, 0
br i1 %84, label %85, label %105
85: ; preds = %70
%86 = getelementptr inbounds i8*, i8** %1, i64 1
%87 = zext i32 %41 to i64
br label %132
88: ; preds = %46, %88
%89 = phi i32 [ %42, %46 ], [ %98, %88 ]
%90 = phi i32 [ 0, %46 ], [ %102, %88 ]
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
%91 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), double* %6, double* %7)
%92 = icmp ne i32 %91, 1
%93 = zext i1 %92 to i32
%94 = or i32 %89, %93
%95 = call i32 (i32*, i8*, ...) @fscanf(i32* %18, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), double* %6, double* %7)
%96 = icmp ne i32 %95, 1
%97 = zext i1 %96 to i32
%98 = or i32 %94, %97
%99 = load double, double* %6
%100 = load double, double* %7
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), double %99, double %100)
%102 = add nuw nsw i32 %90, 1
%103 = load i32, i32* %3
%104 = icmp slt i32 %102, %103
br i1 %104, label %88, label %70
105: ; preds = %132, %70
%106 = phi i32 [ %79, %70 ], [ %144, %132 ]
%107 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i64 4, i64 1, i32* %21)
%108 = load i32, i32* %3
switch i32 %108, label %242 [
i32 1, label %128
i32 2, label %118
i32 3, label %109
]
109: ; preds = %105
%110 = getelementptr inbounds i32, i32* %35, i64 1
%111 = load i32, i32* %110
%112 = icmp sgt i32 %111, 0
br i1 %112, label %113, label %242
113: ; preds = %109
%114 = load i32, i32* %35
%115 = icmp sgt i32 %114, 0
%116 = getelementptr inbounds i32, i32* %35, i64 2
%117 = zext i32 %114 to i64
br label %201
118: ; preds = %105
%119 = getelementptr inbounds i32, i32* %35, i64 1
%120 = load i32, i32* %119
%121 = icmp sgt i32 %120, 0
br i1 %121, label %122, label %242
122: ; preds = %118
%123 = load i32, i32* %35
%124 = icmp sgt i32 %123, 0
%125 = sext i32 %123 to i64
%126 = zext i32 %120 to i64
%127 = zext i32 %123 to i64
br label %176
128: ; preds = %105
br i1 %84, label %129, label %156
129: ; preds = %128
%130 = getelementptr inbounds i8*, i8** %1, i64 1
%131 = zext i32 %41 to i64
br label %159
132: ; preds = %85, %132
%133 = phi i64 [ 0, %85 ], [ %154, %132 ]
%134 = phi i32 [ %79, %85 ], [ %144, %132 ]
%135 = getelementptr inbounds double, double* %81, i64 %133
%136 = call i32 (i32*, i8*, ...) @fscanf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %135)
%137 = icmp ne i32 %136, 1
%138 = zext i1 %137 to i32
%139 = or i32 %134, %138
%140 = getelementptr inbounds double, double* %82, i64 %133
%141 = call i32 (i32*, i8*, ...) @fscanf(i32* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), double* %140)
%142 = icmp ne i32 %141, 1
%143 = zext i1 %142 to i32
%144 = or i32 %139, %143
%145 = load i8*, i8** %86
%146 = load i8, i8* %145
%147 = icmp eq i8 %146, 43
%148 = load double, double* %135
%149 = load double, double* %140
%150 = fneg double %149
%151 = select i1 %147, double %149, double %150
%152 = fadd double %148, %151
%153 = getelementptr inbounds double, double* %83, i64 %133
store double %152, double* %153
%154 = add nuw nsw i64 %133, 1
%155 = icmp eq i64 %154, %87
br i1 %155, label %105, label %132
156: ; preds = %159, %128
%157 = phi double [ 0.000000e+00, %128 ], [ %173, %159 ]
%158 = call i32 @fputc(i32 10, i32* %21)
br label %242
159: ; preds = %129, %159
%160 = phi i64 [ 0, %129 ], [ %174, %159 ]
%161 = phi double [ 0.000000e+00, %129 ], [ %173, %159 ]
%162 = load i8*, i8** %130
%163 = load i8, i8* %162
%164 = icmp eq i8 %163, 43
%165 = getelementptr inbounds double, double* %81, i64 %160
%166 = load double, double* %165
%167 = getelementptr inbounds double, double* %82, i64 %160
%168 = load double, double* %167
%169 = fneg double %168
%170 = select i1 %164, double %168, double %169
%171 = fadd double %166, %170
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), double %171)
%173 = call double @llvm.fmuladd.f64(double %171, double %171, double %161)
%174 = add nuw nsw i64 %160, 1
%175 = icmp eq i64 %174, %131
br i1 %175, label %156, label %159
176: ; preds = %122, %181
%177 = phi i64 [ 0, %122 ], [ %184, %181 ]
%178 = phi double [ 0.000000e+00, %122 ], [ %182, %181 ]
br i1 %124, label %179, label %181
179: ; preds = %176
%180 = mul nsw i64 %177, %125
br label %186
181: ; preds = %186, %176
%182 = phi double [ %178, %176 ], [ %198, %186 ]
%183 = call i32 @fputc(i32 10, i32* %21)
%184 = add nuw nsw i64 %177, 1
%185 = icmp eq i64 %184, %126
br i1 %185, label %242, label %176
186: ; preds = %179, %186
%187 = phi i64 [ 0, %179 ], [ %199, %186 ]
%188 = phi double [ %178, %179 ], [ %198, %186 ]
%189 = add nsw i64 %180, %187
%190 = getelementptr inbounds double, double* %83, i64 %189
%191 = load double, double* %190
%192 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), double %191)
%193 = getelementptr inbounds double, double* %81, i64 %189
%194 = load double, double* %193
%195 = getelementptr inbounds double, double* %82, i64 %189
%196 = load double, double* %195
%197 = fsub double %194, %196
%198 = call double @llvm.fmuladd.f64(double %197, double %197, double %188)
%199 = add nuw nsw i64 %187, 1
%200 = icmp eq i64 %199, %127
br i1 %200, label %181, label %186
201: ; preds = %113, %217
%202 = phi i32 [ 0, %113 ], [ %220, %217 ]
%203 = phi double [ 0.000000e+00, %113 ], [ %218, %217 ]
br i1 %115, label %204, label %217
204: ; preds = %201
%205 = load i32, i32* %116
%206 = icmp sgt i32 %205, 0
%207 = mul nsw i32 %114, %202
%208 = zext i32 %205 to i64
br label %209
209: ; preds = %204, %222
%210 = phi i64 [ 0, %204 ], [ %225, %222 ]
%211 = phi double [ %203, %204 ], [ %223, %222 ]
br i1 %206, label %212, label %222
212: ; preds = %209
%213 = trunc i64 %210 to i32
%214 = add i32 %207, %213
%215 = mul i32 %205, %214
%216 = sext i32 %215 to i64
br label %227
217: ; preds = %222, %201
%218 = phi double [ %203, %201 ], [ %223, %222 ]
%219 = call i32 @fputc(i32 10, i32* %21)
%220 = add nuw nsw i32 %202, 1
%221 = icmp eq i32 %220, %111
br i1 %221, label %242, label %201
222: ; preds = %227, %209
%223 = phi double [ %211, %209 ], [ %239, %227 ]
%224 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i64 3, i64 1, i32* %21)
%225 = add nuw nsw i64 %210, 1
%226 = icmp eq i64 %225, %117
br i1 %226, label %217, label %209
227: ; preds = %212, %227
%228 = phi i64 [ 0, %212 ], [ %240, %227 ]
%229 = phi double [ %211, %212 ], [ %239, %227 ]
%230 = add nsw i64 %228, %216
%231 = getelementptr inbounds double, double* %83, i64 %230
%232 = load double, double* %231
%233 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), double %232)
%234 = getelementptr inbounds double, double* %81, i64 %230
%235 = load double, double* %234
%236 = getelementptr inbounds double, double* %82, i64 %230
%237 = load double, double* %236
%238 = fsub double %235, %237
%239 = call double @llvm.fmuladd.f64(double %238, double %238, double %229)
%240 = add nuw nsw i64 %228, 1
%241 = icmp eq i64 %240, %208
br i1 %241, label %222, label %227
242: ; preds = %217, %181, %109, %118, %105, %156
%243 = phi double [ %157, %156 ], [ 0.000000e+00, %105 ], [ 0.000000e+00, %118 ], [ 0.000000e+00, %109 ], [ %182, %181 ], [ %218, %217 ]
%244 = sitofp i32 %41 to double
%245 = fdiv double %243, %244
%246 = fcmp olt double %245, 0.000000e+00
br i1 %246, label %247, label %249
247: ; preds = %242
%248 = call double @sqrt(double %245)
br label %249
249: ; preds = %242, %247
%250 = call i32 @fclose(i32* %15)
%251 = call i32 @fclose(i32* %18)
%252 = call i32 @fclose(i32* %21)
br label %253
253: ; preds = %249, %9
%254 = phi i32 [ -1, %9 ], [ %106, %249 ]
ret i32 %254
}