#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 */
double atof(char *);
int atoi(char *);
int /*<<< orphan*/ errorHandler(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, double, double,
                           ...);
int /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char toupper(char);
int main(int argc, char *argv[]) {
  FILE *fout;
  char constantPlane[2];
  int a, count, i, j, nx, ny, nz, n, lines;
  double dx, dy, r, x, xmin, xmax, y, ymin, ymax, z;
  if (argc == 2 && strcmp(argv[1], "-h") == 0) {
    printf("\n\nCall as:\n\n\t./meshgen a constantPlane ");
    printf("nx ny xmin xmax ymin ymax r lineNumber\n");
    printf("\nGenerates a regular 2d mesh with limits [(xmin,xmax),");
    printf("(ymin,ymax)] in the\nplane constantPlane = r, where ");
    printf("constantPlane takes the values x, y or z.\n\n");
    printf("lineNumber == 0 : the line number is not recorded in the file\n");
    printf("lineNumber == 1 : the line number is recorded in the file\n\n");
    printf("Example:\n\n\tmesh 1 z 100 20 -50 50 -10 10 0.0 1\n\n");
    printf("Produces a mesh in the plane z = 0.0 in the range x = (-50,50),\n");
    printf(
        "y = (-10,10), with 100 points in the x direction and 20 in the y\n");
    printf("direction. The line number is saved to the ouput file ");
    printf("starting with 1.\n\nThe output file is called 'mesh.dat' ");
    printf("for convenience. It can be called\nsucesively in order to ");
    printf("produce a single file with all the necessary points,\n");
    printf("as long as 'a' contains the correct number of the first ");
    printf("element of the\nplane (1 in the first call, 442 in the second ");
    printf("if n = 21, et...).\n\n");
    exit(0);
  } else if (argc != 11) {
    printf("\n\nCorrect syntaxis is:\nmeshgen a constantPlane nx ny xmin ");
    printf("xmax ymin ymax r lineNumber\n");
    errorHandler("Call 'mesh -h' for help.\n");
  } else {
    a = atoi(argv[1]);
    strcpy(constantPlane, argv[2]);
    nx = atoi(argv[3]);
    ny = atoi(argv[4]);
    xmin = atof(argv[5]);
    xmax = atof(argv[6]);
    ymin = atof(argv[7]);
    ymax = atof(argv[8]);
    r = atof(argv[9]);
    lines = atoi(argv[10]);
  }
  if ((fout = fopen("mesh.dat", "a")) == NULL)
    errorHandler("Error: Can't open output file mesh.dat");
  constantPlane[0] = toupper(constantPlane[0]);
  dx = (xmax - xmin) / (nx - 1);
  dy = (ymax - ymin) / (ny - 1);
  count = a;
  for (i = 0; i < nx; i++) {
    x = xmin + i * dx;
    for (j = 0; j < ny; j++) {
      y = ymin + j * dy;
      if (lines) {
        if (strcmp(constantPlane, "X") == 0)
          fprintf(fout, "%d %le %le %le\n", count, r, x, y);
        else if (strcmp(constantPlane, "Y") == 0)
          fprintf(fout, "%d    %le %le %le\n", count, x, r, y);
        else
          fprintf(fout, "%d   %le %le %le\n", count, x, y, r);
      } else {
        if (strcmp(constantPlane, "X") == 0)
          fprintf(fout, "%le    %le %le\n", r, x, y);
        else if (strcmp(constantPlane, "Y") == 0)
          fprintf(fout, "%le   %le %le\n", x, r, y);
        else
          fprintf(fout, "%le  %le %le\n", x, y, r);
      }
      count++;
    }
  }
  fclose(fout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    12c4 <main+0x114>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe1e(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12c4 <main+0x114>
lea    0xe0b(%rip),%rdi
call   1070 <printf@plt>
lea    0xe27(%rip),%rdi
call   1070 <printf@plt>
lea    0xe43(%rip),%rdi
call   1070 <printf@plt>
lea    0xe6e(%rip),%rdi
call   1070 <printf@plt>
lea    0xe96(%rip),%rdi
call   1070 <printf@plt>
lea    0xeb6(%rip),%rdi
call   1070 <printf@plt>
lea    0xee9(%rip),%rdi
call   1070 <printf@plt>
lea    0xf19(%rip),%rdi
call   1070 <printf@plt>
lea    0xf3e(%rip),%rdi
call   1070 <printf@plt>
lea    0xf73(%rip),%rdi
call   1070 <printf@plt>
lea    0xfa9(%rip),%rdi
call   1070 <printf@plt>
lea    0xfd4(%rip),%rdi
call   1070 <printf@plt>
lea    0x1000(%rip),%rdi
call   1070 <printf@plt>
lea    0x102e(%rip),%rdi
call   1070 <printf@plt>
lea    0x1058(%rip),%rdi
call   1070 <printf@plt>
lea    0x1085(%rip),%rdi
call   1070 <printf@plt>
lea    0x10b7(%rip),%rdi
call   1070 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
cmpl   $0xb,-0x8(%rbp)
je     12f7 <main+0x147>
lea    0x10af(%rip),%rdi
call   1070 <printf@plt>
lea    0xd55(%rip),%rdi
call   1070 <printf@plt>
lea    0x10d2(%rip),%rdi
call   10d0 <errorHandler@plt>
jmp    13a5 <main+0x1f5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x20(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1050 <atof@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1050 <atof@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rdi
call   1050 <atof@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rdi
call   1050 <atof@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%rdi
call   1050 <atof@plt>
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    0x50(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x40(%rbp)
jmp    13aa <main+0x1fa>
lea    0x1048(%rip),%rdi
lea    0x1021(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    13d7 <main+0x227>
lea    0x1009(%rip),%rdi
call   10d0 <errorHandler@plt>
movsbl -0x1a(%rbp),%edi
call   1040 <toupper@plt>
mov    %al,-0x1a(%rbp)
movsd  -0x70(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    161d <main+0x46d>
movsd  -0x68(%rbp),%xmm1
cvtsi2sdl -0x28(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    160a <main+0x45a>
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x2c(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
cmpl   $0x0,-0x40(%rbp)
je     1548 <main+0x398>
lea    -0x1a(%rbp),%rdi
lea    0xf69(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    14d3 <main+0x323>
mov    -0x18(%rbp),%rdi
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
lea    0xf3d(%rip),%rsi
mov    $0x4,%al
call   1090 <fprintf@plt>
jmp    1543 <main+0x393>
lea    -0x1a(%rbp),%rdi
lea    0xf36(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1518 <main+0x368>
mov    -0x18(%rbp),%rdi
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm3
lea    0xf0a(%rip),%rsi
mov    $0x4,%al
call   1090 <fprintf@plt>
jmp    153e <main+0x38e>
mov    -0x18(%rbp),%rdi
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
lea    0xef2(%rip),%rsi
mov    $0x4,%al
call   1090 <fprintf@plt>
jmp    1543 <main+0x393>
jmp    15f3 <main+0x443>
lea    -0x1a(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1588 <main+0x3d8>
mov    -0x18(%rbp),%rdi
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
lea    0xebf(%rip),%rsi
mov    $0x3,%al
call   1090 <fprintf@plt>
jmp    15ee <main+0x43e>
lea    -0x1a(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    15c8 <main+0x418>
mov    -0x18(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
lea    0xe8f(%rip),%rsi
mov    $0x3,%al
call   1090 <fprintf@plt>
jmp    15e9 <main+0x439>
mov    -0x18(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
lea    0xe78(%rip),%rsi
mov    $0x3,%al
call   1090 <fprintf@plt>
jmp    15ee <main+0x43e>
jmp    15f3 <main+0x443>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    145c <main+0x2ac>
jmp    160f <main+0x45f>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    142d <main+0x27d>
mov    -0x18(%rbp),%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%rbp
cmp    $0xb,%edi
je     1222 <main+0x62>
cmp    $0x2,%edi
jne    11f4 <main+0x34>
mov    0x8(%rbp),%rdi
lea    0xe22(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     151b <main+0x35b>
lea    0xfc3(%rip),%rdi
call   1080 <printf@plt>
lea    0x10a6(%rip),%rdi
call   1050 <puts@plt>
lea    0xfe6(%rip),%rdi
call   10e0 <errorHandler@plt>
mov    %rax,0x28(%rsp)
jmp    12ac <main+0xec>
mov    0x8(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,%ebx
mov    0x10(%rbp),%rsi
lea    0xe(%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x18(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %rax,0x28(%rsp)
mov    0x20(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r15d
mov    0x28(%rbp),%rdi
call   1060 <atof@plt>
movsd  %xmm0,0x48(%rsp)
mov    0x30(%rbp),%rdi
call   1060 <atof@plt>
movsd  %xmm0,0x30(%rsp)
mov    0x38(%rbp),%rdi
call   1060 <atof@plt>
movsd  %xmm0,0x58(%rsp)
mov    0x40(%rbp),%rdi
call   1060 <atof@plt>
movsd  %xmm0,0x38(%rsp)
mov    0x48(%rbp),%rdi
call   1060 <atof@plt>
movsd  %xmm0,0x10(%rsp)
mov    0x50(%rbp),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r12d
lea    0xf80(%rip),%rdi
lea    0xf59(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    12d3 <main+0x113>
lea    0xf47(%rip),%rdi
call   10e0 <errorHandler@plt>
movsbl 0xe(%rsp),%edi
call   1040 <toupper@plt>
mov    %al,0xe(%rsp)
cmpl   $0x0,0x28(%rsp)
jle    1502 <main+0x342>
movsd  0x30(%rsp),%xmm1
subsd  0x48(%rsp),%xmm1
mov    0x28(%rsp),%rax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x38(%rsp),%xmm1
subsd  0x58(%rsp),%xmm1
lea    -0x1(%r15),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rsp)
xor    %eax,%eax
xorpd  %xmm0,%xmm0
lea    0xefd(%rip),%r13
lea    0xe(%rsp),%r14
mov    %r15,0x68(%rsp)
jmp    1374 <main+0x1b4>
nopl   0x0(%rax,%rax,1)
movsd  0x70(%rsp),%xmm0
addsd  0xca2(%rip),%xmm0
mov    0x44(%rsp),%eax
add    $0x1,%eax
cmp    0x28(%rsp),%eax
mov    0x68(%rsp),%r15
je     1502 <main+0x342>
mov    %eax,0x44(%rsp)
test   %r15d,%r15d
movsd  %xmm0,0x70(%rsp)
jle    1350 <main+0x190>
mulsd  0x30(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
xorpd  %xmm0,%xmm0
jmp    13d8 <main+0x218>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
lea    0xe94(%rip),%rsi
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
mov    $0x4,%al
call   10a0 <fprintf@plt>
add    $0x1,%ebx
movsd  0x60(%rsp),%xmm0
addsd  0xc32(%rip),%xmm0
add    $0xffffffff,%r15d
je     1350 <main+0x190>
movsd  %xmm0,0x60(%rsp)
mov    %r14,%rdi
mov    %r13,%rsi
call   1090 <strcmp@plt>
movsd  0x60(%rsp),%xmm3
mulsd  0x38(%rsp),%xmm3
addsd  0x58(%rsp),%xmm3
test   %r12d,%r12d
je     1460 <main+0x2a0>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
test   %rax,%rax
je     13a0 <main+0x1e0>
movsd  %xmm0,0x50(%rsp)
movsd  %xmm3,0x20(%rsp)
mov    %r14,%rdi
lea    0xe2c(%rip),%rsi
call   1090 <strcmp@plt>
mov    %rbp,%rdi
test   %rax,%rax
je     149d <main+0x2dd>
lea    0xe2d(%rip),%rsi
movsd  0x50(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
jmp    13b6 <main+0x1f6>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %rax,%rax
je     14c1 <main+0x301>
movsd  %xmm3,0x20(%rsp)
mov    %r14,%rdi
lea    0xdd9(%rip),%rsi
call   1090 <strcmp@plt>
mov    %rbp,%rdi
test   %rax,%rax
je     14dd <main+0x31d>
lea    0xe0b(%rip),%rsi
movsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
jmp    14f6 <main+0x336>
lea    0xdac(%rip),%rsi
movsd  0x50(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
jmp    13b6 <main+0x1f6>
mov    %rbp,%rdi
lea    0xdaa(%rip),%rsi
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movapd %xmm3,%xmm2
jmp    14f6 <main+0x336>
lea    0xda1(%rip),%rsi
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mov    $0x3,%al
call   10a0 <fprintf@plt>
jmp    13bd <main+0x1fd>
mov    %rbp,%rdi
call   1070 <fclose@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xae9(%rip),%rdi
call   1080 <printf@plt>
lea    0xd74(%rip),%rdi
call   1050 <puts@plt>
lea    0xaf9(%rip),%rdi
call   1080 <printf@plt>
lea    0xb24(%rip),%rdi
call   1080 <printf@plt>
lea    0xd77(%rip),%rdi
call   1050 <puts@plt>
lea    0xd96(%rip),%rdi
call   1050 <puts@plt>
lea    0xdc8(%rip),%rdi
call   1050 <puts@plt>
lea    0xdf7(%rip),%rdi
call   1050 <puts@plt>
lea    0xe1b(%rip),%rdi
call   1050 <puts@plt>
lea    0xe4f(%rip),%rdi
call   1050 <puts@plt>
lea    0xb04(%rip),%rdi
call   1080 <printf@plt>
lea    0xb2f(%rip),%rdi
call   1080 <printf@plt>
lea    0xb5b(%rip),%rdi
call   1080 <printf@plt>
lea    0xe60(%rip),%rdi
call   1050 <puts@plt>
lea    0xb7d(%rip),%rdi
call   1080 <printf@plt>
lea    0xbaa(%rip),%rdi
call   1080 <printf@plt>
lea    0xe71(%rip),%rdi
call   1050 <puts@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [40 x i8] c"\0A\0ACall as:\0A\0A\09./meshgen a constantPlane \00"
@.str.2 = [40 x i8] c"nx ny xmin xmax ymin ymax r lineNumber\0A\00"
@.str.3 = [55 x i8] c"\0AGenerates a regular 2d mesh with limits [(xmin,xmax),\00"
@.str.4 = [52 x i8] c"(ymin,ymax)] in the\0Aplane constantPlane = r, where \00"
@.str.5 = [44 x i8] c"constantPlane takes the values x, y or z.\0A\0A\00"
@.str.6 = [63 x i8] c"lineNumber == 0 : the line number is not recorded in the file\0A\00"
@.str.7 = [60 x i8] c"lineNumber == 1 : the line number is recorded in the file\0A\0A\00"
@.str.8 = [49 x i8] c"Example:\0A\0A\09mesh 1 z 100 20 -50 50 -10 10 0.0 1\0A\0A\00"
@.str.9 = [65 x i8] c"Produces a mesh in the plane z = 0.0 in the range x = (-50,50),\0A\00"
@.str.10 = [66 x i8] c"y = (-10,10), with 100 points in the x direction and 20 in the y\0A\00"
@.str.11 = [55 x i8] c"direction. The line number is saved to the ouput file \00"
@.str.12 = [56 x i8] c"starting with 1.\0A\0AThe output file is called 'mesh.dat' \00"
@.str.13 = [58 x i8] c"for convenience. It can be called\0Asucesively in order to \00"
@.str.14 = [54 x i8] c"produce a single file with all the necessary points,\0A\00"
@.str.15 = [57 x i8] c"as long as 'a' contains the correct number of the first \00"
@.str.16 = [62 x i8] c"element of the\0Aplane (1 in the first call, 442 in the second \00"
@.str.17 = [21 x i8] c"if n = 21, et...).\0A\0A\00"
@.str.18 = [59 x i8] c"\0A\0ACorrect syntaxis is:\0Ameshgen a constantPlane nx ny xmin \00"
@.str.19 = [29 x i8] c"xmax ymin ymax r lineNumber\0A\00"
@.str.20 = [26 x i8] c"Call 'mesh -h' for help.\0A\00"
@.str.21 = [9 x i8] c"mesh.dat\00"
@.str.22 = [2 x i8] c"a\00"
@.str.23 = [39 x i8] c"Error: Can't open output file mesh.dat\00"
@.str.24 = [2 x i8] c"X\00"
@.str.25 = [16 x i8] c"%d %le %le %le\0A\00"
@.str.26 = [2 x i8] c"Y\00"
@.str.27 = [19 x i8] c"%d %le %le %le\0A\00"
@.str.28 = [18 x i8] c"%d %le %le %le\0A\00"
@.str.29 = [16 x i8] c"%le %le %le\0A\00"
@.str.30 = [15 x i8] c"%le %le %le\0A\00"
@.str.31 = [14 x i8] c"%le %le %le\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca [2 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%27 = load i32, i32* %4
%28 = icmp eq i32 %27, 2
br i1 %28, label %29, label %54
29: ; preds = %2
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %54
35: ; preds = %29
%36 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%37 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%40 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%41 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%42 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0))
%43 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
%44 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.9, i64 0, i64 0))
%45 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
%46 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.11, i64 0, i64 0))
%47 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.12, i64 0, i64 0))
%48 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0))
%49 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.14, i64 0, i64 0))
%50 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.15, i64 0, i64 0))
%51 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.16, i64 0, i64 0))
%52 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
%53 = call i32 @exit(i32 0)
unreachable
54: ; preds = %29, %2
%55 = load i32, i32* %4
%56 = icmp ne i32 %55, 11
br i1 %56, label %57, label %61
57: ; preds = %54
%58 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.18, i64 0, i64 0))
%59 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
%60 = call i32 @errorHandler(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.20, i64 0, i64 0))
br label %103
61: ; preds = %54
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = load i8*, i8** %63
%65 = call i32 @atoi(i8* %64)
store i32 %65, i32* %8
%66 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 2
%69 = load i8*, i8** %68
%70 = call i32 @strcpy(i8* %66, i8* %69)
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 3
%73 = load i8*, i8** %72
%74 = call i32 @atoi(i8* %73)
store i32 %74, i32* %12
%75 = load i8**, i8*** %5
%76 = getelementptr inbounds i8*, i8** %75, i64 4
%77 = load i8*, i8** %76
%78 = call i32 @atoi(i8* %77)
store i32 %78, i32* %13
%79 = load i8**, i8*** %5
%80 = getelementptr inbounds i8*, i8** %79, i64 5
%81 = load i8*, i8** %80
%82 = call double @atof(i8* %81)
store double %82, double* %21
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 6
%85 = load i8*, i8** %84
%86 = call double @atof(i8* %85)
store double %86, double* %22
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i64 7
%89 = load i8*, i8** %88
%90 = call double @atof(i8* %89)
store double %90, double* %24
%91 = load i8**, i8*** %5
%92 = getelementptr inbounds i8*, i8** %91, i64 8
%93 = load i8*, i8** %92
%94 = call double @atof(i8* %93)
store double %94, double* %25
%95 = load i8**, i8*** %5
%96 = getelementptr inbounds i8*, i8** %95, i64 9
%97 = load i8*, i8** %96
%98 = call double @atof(i8* %97)
store double %98, double* %19
%99 = load i8**, i8*** %5
%100 = getelementptr inbounds i8*, i8** %99, i64 10
%101 = load i8*, i8** %100
%102 = call i32 @atoi(i8* %101)
store i32 %102, i32* %16
br label %103
103: ; preds = %61, %57
br label %104
104: ; preds = %103
%105 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0))
store i32* %105, i32** %6
%106 = icmp eq i32* %105, null
br i1 %106, label %107, label %109
107: ; preds = %104
%108 = call i32 @errorHandler(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.23, i64 0, i64 0))
br label %109
109: ; preds = %107, %104
%110 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%111 = load i8, i8* %110
%112 = call signext i8 @toupper(i8 signext %111)
%113 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
store i8 %112, i8* %113
%114 = load double, double* %22
%115 = load double, double* %21
%116 = fsub double %114, %115
%117 = load i32, i32* %12
%118 = sub nsw i32 %117, 1
%119 = sitofp i32 %118 to double
%120 = fdiv double %116, %119
store double %120, double* %17
%121 = load double, double* %25
%122 = load double, double* %24
%123 = fsub double %121, %122
%124 = load i32, i32* %13
%125 = sub nsw i32 %124, 1
%126 = sitofp i32 %125 to double
%127 = fdiv double %123, %126
store double %127, double* %18
%128 = load i32, i32* %8
store i32 %128, i32* %9
store i32 0, i32* %10
br label %129
129: ; preds = %220, %109
%130 = load i32, i32* %10
%131 = load i32, i32* %12
%132 = icmp slt i32 %130, %131
br i1 %132, label %133, label %223
133: ; preds = %129
%134 = load double, double* %21
%135 = load i32, i32* %10
%136 = sitofp i32 %135 to double
%137 = load double, double* %17
%138 = call double @llvm.fmuladd.f64(double %136, double %137, double %134)
store double %138, double* %20
store i32 0, i32* %11
br label %139
139: ; preds = %216, %133
%140 = load i32, i32* %11
%141 = load i32, i32* %13
%142 = icmp slt i32 %140, %141
br i1 %142, label %143, label %219
143: ; preds = %139
%144 = load double, double* %24
%145 = load i32, i32* %11
%146 = sitofp i32 %145 to double
%147 = load double, double* %18
%148 = call double @llvm.fmuladd.f64(double %146, double %147, double %144)
store double %148, double* %23
%149 = load i32, i32* %16
%150 = icmp ne i32 %149, 0
br i1 %150, label %151, label %185
151: ; preds = %143
%152 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%153 = call i64 @strcmp(i8* %152, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%154 = icmp eq i64 %153, 0
br i1 %154, label %155, label %163
155: ; preds = %151
%156 = load i32*, i32** %6
%157 = load i32, i32* %9
%158 = sitofp i32 %157 to double
%159 = load double, double* %19
%160 = load double, double* %20
%161 = load double, double* %23
%162 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %156, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.25, i64 0, i64 0), double %158, double %159, double %160, double %161)
br label %184
163: ; preds = %151
%164 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%165 = call i64 @strcmp(i8* %164, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%166 = icmp eq i64 %165, 0
br i1 %166, label %167, label %175
167: ; preds = %163
%168 = load i32*, i32** %6
%169 = load i32, i32* %9
%170 = sitofp i32 %169 to double
%171 = load double, double* %20
%172 = load double, double* %19
%173 = load double, double* %23
%174 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0), double %170, double %171, double %172, double %173)
br label %183
175: ; preds = %163
%176 = load i32*, i32** %6
%177 = load i32, i32* %9
%178 = sitofp i32 %177 to double
%179 = load double, double* %20
%180 = load double, double* %23
%181 = load double, double* %19
%182 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %176, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.28, i64 0, i64 0), double %178, double %179, double %180, double %181)
br label %183
183: ; preds = %175, %167
br label %184
184: ; preds = %183, %155
br label %213
185: ; preds = %143
%186 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%187 = call i64 @strcmp(i8* %186, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%188 = icmp eq i64 %187, 0
br i1 %188, label %189, label %195
189: ; preds = %185
%190 = load i32*, i32** %6
%191 = load double, double* %19
%192 = load double, double* %20
%193 = load double, double* %23
%194 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %190, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.29, i64 0, i64 0), double %191, double %192, double %193)
br label %212
195: ; preds = %185
%196 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%197 = call i64 @strcmp(i8* %196, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%198 = icmp eq i64 %197, 0
br i1 %198, label %199, label %205
199: ; preds = %195
%200 = load i32*, i32** %6
%201 = load double, double* %20
%202 = load double, double* %19
%203 = load double, double* %23
%204 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %200, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.30, i64 0, i64 0), double %201, double %202, double %203)
br label %211
205: ; preds = %195
%206 = load i32*, i32** %6
%207 = load double, double* %20
%208 = load double, double* %23
%209 = load double, double* %19
%210 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %206, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.31, i64 0, i64 0), double %207, double %208, double %209)
br label %211
211: ; preds = %205, %199
br label %212
212: ; preds = %211, %189
br label %213
213: ; preds = %212, %184
%214 = load i32, i32* %9
%215 = add nsw i32 %214, 1
store i32 %215, i32* %9
br label %216
216: ; preds = %213
%217 = load i32, i32* %11
%218 = add nsw i32 %217, 1
store i32 %218, i32* %11
br label %139
219: ; preds = %139
br label %220
220: ; preds = %219
%221 = load i32, i32* %10
%222 = add nsw i32 %221, 1
store i32 %222, i32* %10
br label %129
223: ; preds = %129
%224 = load i32*, i32** %6
%225 = call i32 @fclose(i32* %224)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [40 x i8] c"\0A\0ACall as:\0A\0A\09./meshgen a constantPlane \00"
@.str.3 = [55 x i8] c"\0AGenerates a regular 2d mesh with limits [(xmin,xmax),\00"
@.str.4 = [52 x i8] c"(ymin,ymax)] in the\0Aplane constantPlane = r, where \00"
@.str.11 = [55 x i8] c"direction. The line number is saved to the ouput file \00"
@.str.12 = [56 x i8] c"starting with 1.\0A\0AThe output file is called 'mesh.dat' \00"
@.str.13 = [58 x i8] c"for convenience. It can be called\0Asucesively in order to \00"
@.str.15 = [57 x i8] c"as long as 'a' contains the correct number of the first \00"
@.str.16 = [62 x i8] c"element of the\0Aplane (1 in the first call, 442 in the second \00"
@.str.18 = [59 x i8] c"\0A\0ACorrect syntaxis is:\0Ameshgen a constantPlane nx ny xmin \00"
@.str.20 = [26 x i8] c"Call 'mesh -h' for help.\0A\00"
@.str.21 = [9 x i8] c"mesh.dat\00"
@.str.22 = [2 x i8] c"a\00"
@.str.23 = [39 x i8] c"Error: Can't open output file mesh.dat\00"
@.str.24 = [2 x i8] c"X\00"
@.str.25 = [16 x i8] c"%d %le %le %le\0A\00"
@.str.26 = [2 x i8] c"Y\00"
@.str.27 = [19 x i8] c"%d %le %le %le\0A\00"
@.str.28 = [18 x i8] c"%d %le %le %le\0A\00"
@.str.29 = [16 x i8] c"%le %le %le\0A\00"
@.str.30 = [15 x i8] c"%le %le %le\0A\00"
@.str.31 = [14 x i8] c"%le %le %le\0A\00"
@str = [28 x i8] c"xmax ymin ymax r lineNumber\00"
@str.32 = [39 x i8] c"nx ny xmin xmax ymin ymax r lineNumber\00"
@str.33 = [43 x i8] c"constantPlane takes the values x, y or z.\0A\00"
@str.34 = [62 x i8] c"lineNumber == 0 : the line number is not recorded in the file\00"
@str.35 = [59 x i8] c"lineNumber == 1 : the line number is recorded in the file\0A\00"
@str.36 = [48 x i8] c"Example:\0A\0A\09mesh 1 z 100 20 -50 50 -10 10 0.0 1\0A\00"
@str.37 = [64 x i8] c"Produces a mesh in the plane z = 0.0 in the range x = (-50,50),\00"
@str.38 = [65 x i8] c"y = (-10,10), with 100 points in the x direction and 20 in the y\00"
@str.39 = [53 x i8] c"produce a single file with all the necessary points,\00"
@str.40 = [20 x i8] c"if n = 21, et...).\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
switch i32 %0, label %29 [
i32 2, label %5
i32 11, label %33
]
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %29
10: ; preds = %5
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.32, i64 0, i64 0))
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.33, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.34, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.35, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.36, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.37, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.38, i64 0, i64 0))
%21 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.11, i64 0, i64 0))
%22 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.12, i64 0, i64 0))
%23 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.13, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.39, i64 0, i64 0))
%25 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.15, i64 0, i64 0))
%26 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.16, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.40, i64 0, i64 0))
%28 = tail call i32 @exit(i32 0)
unreachable
29: ; preds = %5, %2
%30 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.18, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%32 = tail call i32 @errorHandler(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.20, i64 0, i64 0))
br label %64
33: ; preds = %2
%34 = getelementptr inbounds i8*, i8** %1, i64 1
%35 = load i8*, i8** %34
%36 = tail call i32 @atoi(i8* %35)
%37 = getelementptr inbounds i8*, i8** %1, i64 2
%38 = load i8*, i8** %37
%39 = call i32 @strcpy(i8* %4, i8* %38)
%40 = getelementptr inbounds i8*, i8** %1, i64 3
%41 = load i8*, i8** %40
%42 = call i32 @atoi(i8* %41)
%43 = getelementptr inbounds i8*, i8** %1, i64 4
%44 = load i8*, i8** %43
%45 = call i32 @atoi(i8* %44)
%46 = getelementptr inbounds i8*, i8** %1, i64 5
%47 = load i8*, i8** %46
%48 = call double @atof(i8* %47)
%49 = getelementptr inbounds i8*, i8** %1, i64 6
%50 = load i8*, i8** %49
%51 = call double @atof(i8* %50)
%52 = getelementptr inbounds i8*, i8** %1, i64 7
%53 = load i8*, i8** %52
%54 = call double @atof(i8* %53)
%55 = getelementptr inbounds i8*, i8** %1, i64 8
%56 = load i8*, i8** %55
%57 = call double @atof(i8* %56)
%58 = getelementptr inbounds i8*, i8** %1, i64 9
%59 = load i8*, i8** %58
%60 = call double @atof(i8* %59)
%61 = getelementptr inbounds i8*, i8** %1, i64 10
%62 = load i8*, i8** %61
%63 = call i32 @atoi(i8* %62)
br label %64
64: ; preds = %29, %33
%65 = phi i32 [ undef, %29 ], [ %45, %33 ]
%66 = phi i32 [ undef, %29 ], [ %63, %33 ]
%67 = phi i32 [ undef, %29 ], [ %42, %33 ]
%68 = phi double [ undef, %29 ], [ %60, %33 ]
%69 = phi double [ undef, %29 ], [ %48, %33 ]
%70 = phi double [ undef, %29 ], [ %51, %33 ]
%71 = phi double [ undef, %29 ], [ %54, %33 ]
%72 = phi double [ undef, %29 ], [ %57, %33 ]
%73 = phi i32 [ undef, %29 ], [ %36, %33 ]
%74 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0))
%75 = icmp eq i32* %74, null
br i1 %75, label %76, label %78
76: ; preds = %64
%77 = call i32 @errorHandler(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.23, i64 0, i64 0))
br label %78
78: ; preds = %76, %64
%79 = load i8, i8* %4
%80 = call signext i8 @toupper(i8 signext %79)
store i8 %80, i8* %4
%81 = fsub double %70, %69
%82 = add nsw i32 %67, -1
%83 = sitofp i32 %82 to double
%84 = fdiv double %81, %83
%85 = fsub double %72, %71
%86 = add nsw i32 %65, -1
%87 = sitofp i32 %86 to double
%88 = fdiv double %85, %87
%89 = icmp sgt i32 %67, 0
br i1 %89, label %90, label %135
90: ; preds = %78
%91 = icmp sgt i32 %65, 0
%92 = icmp eq i32 %66, 0
br label %93
93: ; preds = %90, %131
%94 = phi i32 [ %73, %90 ], [ %132, %131 ]
%95 = phi i32 [ 0, %90 ], [ %133, %131 ]
%96 = sitofp i32 %95 to double
%97 = call double @llvm.fmuladd.f64(double %96, double %84, double %69)
br i1 %91, label %98, label %131
98: ; preds = %93, %127
%99 = phi i32 [ %128, %127 ], [ %94, %93 ]
%100 = phi i32 [ %129, %127 ], [ 0, %93 ]
%101 = sitofp i32 %100 to double
%102 = call double @llvm.fmuladd.f64(double %101, double %88, double %71)
%103 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%104 = icmp eq i64 %103, 0
br i1 %92, label %117, label %105
105: ; preds = %98
br i1 %104, label %106, label %109
106: ; preds = %105
%107 = sitofp i32 %99 to double
%108 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.25, i64 0, i64 0), double %107, double %68, double %97, double %102)
br label %127
109: ; preds = %105
%110 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%111 = icmp eq i64 %110, 0
%112 = sitofp i32 %99 to double
br i1 %111, label %113, label %115
113: ; preds = %109
%114 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.27, i64 0, i64 0), double %112, double %97, double %68, double %102)
br label %127
115: ; preds = %109
%116 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.28, i64 0, i64 0), double %112, double %97, double %102, double %68)
br label %127
117: ; preds = %98
br i1 %104, label %118, label %120
118: ; preds = %117
%119 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.29, i64 0, i64 0), double %68, double %97, double %102)
br label %127
120: ; preds = %117
%121 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%122 = icmp eq i64 %121, 0
br i1 %122, label %123, label %125
123: ; preds = %120
%124 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.30, i64 0, i64 0), double %97, double %68, double %102)
br label %127
125: ; preds = %120
%126 = call i32 (i32*, i8*, double, double, double, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.31, i64 0, i64 0), double %97, double %102, double %68)
br label %127
127: ; preds = %118, %125, %123, %106, %115, %113
%128 = add nsw i32 %99, 1
%129 = add nuw nsw i32 %100, 1
%130 = icmp eq i32 %129, %65
br i1 %130, label %131, label %98
131: ; preds = %127, %93
%132 = phi i32 [ %94, %93 ], [ %128, %127 ]
%133 = add nuw nsw i32 %95, 1
%134 = icmp eq i32 %133, %67
br i1 %134, label %135, label %93
135: ; preds = %131, %78
%136 = call i32 @fclose(i32* %74)
ret i32 0
}