#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 *);
unsigned 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 *, unsigned int,
                           unsigned int, unsigned int, ...);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  FILE *nodefile, *cellfile;
  unsigned int count, i, j, k, nx, ny, nz, node1, node2, node3, node4, node5,
      node6, node7, node8;
  double dx, dy, dz, x, xmin, xmax, y, ymin, ymax, z, zmin, zmax;
  if (argc == 2 && strcmp(argv[1], "-h") == 0) {
    printf("\n\nCall as:\n\n\t./cellgen nx ny nz xmin xmax ymin ymax ");
    printf("zmin zmax\n\nGenerates a regular 3D mesh with");
    printf(" limits [(xmin,xmax),(ymin,ymax),(zmin,\nzmax)]. The output ");
    printf("files are called 'cells.dat' and 'cellnodes.dat'.\n\n");
    printf("Example of use:\n\n\tmesh 100 20 10 -50 50 -10 10 -25 25\n\n");
    printf("This produces a regular mesh in the range x = (-50,50), ");
    printf("y = (-10,10),\nz = (-25,25) with 100 points in the x ");
    printf("direction, 20 in the y direction\nand 10 in z direction.\n\n");
    exit(0);
  } else if (argc != 10) {
    printf("\nCorrect syntaxis is:\n\n\t./cellgen nx ny nz xmin xmax ymin ");
    printf("ymax zmin zmax\n");
    errorHandler("Type './cellgen -h' for help.\n");
  } else {
    nx = atoi(argv[1]);
    ny = atoi(argv[2]);
    nz = atoi(argv[3]);
    xmin = atof(argv[4]);
    xmax = atof(argv[5]);
    ymin = atof(argv[6]);
    ymax = atof(argv[7]);
    zmin = atof(argv[8]);
    zmax = atof(argv[9]);
  }
  dx = (xmax - xmin) / (nx - 1);
  dy = (ymax - ymin) / (ny - 1);
  dz = (zmax - zmin) / (nz - 1);
  if ((nodefile = fopen("cellnodes.dat", "w")) == NULL)
    errorHandler("Error: Can't open output file cellnodes.dat");
  if ((cellfile = fopen("cells.dat", "w")) == NULL)
    errorHandler("Error: Can't open output file cells.dat");
  count = 0;
  for (k = 0; k < nz; k++) {
    z = zmin + k * dz;
    for (j = 0; j < ny; j++) {
      y = ymin + j * dy;
      for (i = 0; i < nx; i++) {
        x = xmin + i * dx;
        fprintf(nodefile, "%d\t%le\t%le\t%le\n", count + 1, x, y, z);
        count++;
      }
    }
  }
  fclose(nodefile);
  count = 1;
  for (k = 0; k < (nz - 1); k++) {
    for (j = 0; j < (ny - 1); j++) {
      for (i = 0; i < (nx - 1); i++) {
        node1 = i + j * nx + k * nx * ny;
        node2 = node1 + 1;
        node3 = node2 + nx;
        node4 = node1 + nx;
        node5 = node1 + nx * ny;
        node6 = node2 + nx * ny;
        node7 = node3 + nx * ny;
        node8 = node4 + nx * ny;
        fprintf(cellfile, "%d\t%d\t%d\t", count, node1 + 1, node2 + 1);
        fprintf(cellfile, "%d\t%d\t%d\t", node3 + 1, node4 + 1, node5 + 1);
        fprintf(cellfile, "%d\t%d\t%d\n", node6 + 1, node7 + 1, node8 + 1);
        count++;
      }
    }
  }
  fclose(cellfile);
  printf("\nNumber of nodes:\t%d", nx * ny * nz);
  printf("\nNumber of cells:\t%d\n\n", (nx - 1) * (ny - 1) * (nz - 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1248 <main+0xb8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe3e(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1248 <main+0xb8>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf40(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
cmpl   $0xa,-0x8(%rbp)
je     127f <main+0xef>
lea    0xf5b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf88(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf8a(%rip),%rdi
call   10b0 <errorHandler@plt>
jmp    132d <main+0x19d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    1332 <main+0x1a2>
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
lea    0xe8d(%rip),%rdi
lea    0xe66(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    13d7 <main+0x247>
lea    0xe4e(%rip),%rdi
call   10b0 <errorHandler@plt>
lea    0xe8c(%rip),%rdi
lea    0xe39(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1404 <main+0x274>
lea    0xe4d(%rip),%rdi
call   10b0 <errorHandler@plt>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jae    1521 <main+0x391>
movsd  -0xb8(%rbp),%xmm1
ff
mov    -0x30(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jae    150e <main+0x37e>
movsd  -0xa0(%rbp),%xmm1
ff
mov    -0x2c(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x34(%rbp),%eax
jae    14fb <main+0x36b>
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x28(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%edx
add    $0x1,%edx
cvttsd2si -0x80(%rbp),%rax
mov    %eax,%ecx
cvttsd2si -0x98(%rbp),%rax
ff ff
mov    %eax,%r8d
movsd  -0xb0(%rbp),%xmm0
ff
lea    0xd97(%rip),%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1482 <main+0x2f2>
jmp    1500 <main+0x370>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    144a <main+0x2ba>
jmp    1513 <main+0x383>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1412 <main+0x282>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jae    1698 <main+0x508>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jae    1685 <main+0x4f5>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jae    1672 <main+0x4e2>
mov    -0x28(%rbp),%eax
mov    -0x2c(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    %ecx,%eax
mov    -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x40(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x34(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x34(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%eax
mov    -0x34(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x58(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x34(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x40(%rbp),%ecx
add    $0x1,%ecx
mov    -0x44(%rbp),%r8d
add    $0x1,%r8d
lea    0xc7c(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x48(%rbp),%edx
add    $0x1,%edx
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
mov    -0x50(%rbp),%r8d
add    $0x1,%r8d
lea    0xc56(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x54(%rbp),%edx
add    $0x1,%edx
mov    -0x58(%rbp),%ecx
add    $0x1,%ecx
mov    -0x5c(%rbp),%r8d
add    $0x1,%r8d
lea    0xc3a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1568 <main+0x3d8>
jmp    1677 <main+0x4e7>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1550 <main+0x3c0>
jmp    168a <main+0x4fa>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1538 <main+0x3a8>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x34(%rbp),%esi
imul   -0x38(%rbp),%esi
imul   -0x3c(%rbp),%esi
lea    0xbe5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x34(%rbp),%esi
sub    $0x1,%esi
mov    -0x38(%rbp),%eax
sub    $0x1,%eax
imul   %eax,%esi
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
imul   %eax,%esi
lea    0xbd4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rsi,%rbx
cmp    $0xa,%edi
je     1211 <main+0x71>
cmp    $0x2,%edi
jne    11d7 <main+0x37>
mov    0x8(%rbx),%rdi
lea    0xe3f(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     16af <main+0x50f>
lea    0xf38(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x102a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf59(%rip),%rdi
call   10c0 <errorHandler@plt>
mov    %rax,0x30(%rsp)
mov    %rax,0x10(%rsp)
mov    %rax,0x18(%rsp)
jmp    1298 <main+0xf8>
mov    0x8(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %rax,0x18(%rsp)
mov    0x10(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %rax,0x10(%rsp)
mov    0x18(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %rax,0x30(%rsp)
mov    0x20(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x48(%rsp)
mov    0x28(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x20(%rsp)
mov    0x30(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x40(%rsp)
mov    0x38(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x28(%rsp)
mov    0x40(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x80(%rsp)
mov    0x48(%rbx),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x60(%rsp)
lea    0xef1(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
jne    12bf <main+0x11f>
lea    0xeb8(%rip),%rdi
call   10c0 <errorHandler@plt>
lea    0xef6(%rip),%rdi
lea    0xea3(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,0x68(%rsp)
test   %rax,%rax
jne    12e8 <main+0x148>
lea    0xebb(%rip),%rdi
call   10c0 <errorHandler@plt>
mov    0x18(%rsp),%rax
lea    -0x1(%rax),%edx
mov    0x10(%rsp),%rcx
lea    -0x1(%rcx),%r12d
mov    0x30(%rsp),%rcx
lea    -0x1(%rcx),%esi
test   %ecx,%ecx
mov    %r12,0x90(%rsp)
mov    %rdx,0x78(%rsp)
mov    %rsi,0x88(%rsp)
je     1506 <main+0x366>
movsd  0x48(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
subsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %rdx,%xmm0
divsd  %xmm0,%xmm2
movsd  0x28(%rsp),%xmm3
subsd  0x40(%rsp),%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %r12,%xmm0
divsd  %xmm0,%xmm3
movsd  %xmm3,0x28(%rsp)
movsd  0x60(%rsp),%xmm3
subsd  0x80(%rsp),%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %rsi,%xmm0
divsd  %xmm0,%xmm3
movsd  %xmm3,0x60(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
movsd  0xc79(%rip),%xmm3
lea    0xe38(%rip),%r15
xor    %ecx,%ecx
movsd  %xmm2,0x20(%rsp)
jmp    13bb <main+0x21b>
nopl   0x0(%rax,%rax,1)
movsd  0x38(%rsp),%xmm0
addsd  %xmm3,%xmm0
mov    0xc(%rsp),%ecx
add    $0x1,%ecx
cmp    0x30(%rsp),%ecx
je     148b <main+0x2eb>
mov    %ecx,0xc(%rsp)
cmpl   $0x0,0x10(%rsp)
movsd  %xmm0,0x38(%rsp)
je     13a0 <main+0x200>
mulsd  0x60(%rsp),%xmm0
addsd  0x80(%rsp),%xmm0
xor    %ebx,%ebx
xorpd  %xmm4,%xmm4
movsd  %xmm0,0x50(%rsp)
jmp    1408 <main+0x268>
nopl   0x0(%rax)
movsd  0x70(%rsp),%xmm4
addsd  %xmm3,%xmm4
add    $0x1,%ebx
cmp    0x10(%rsp),%ebx
mov    0x18(%rsp),%rax
je     13a0 <main+0x200>
test   %eax,%eax
movsd  %xmm4,0x70(%rsp)
je     13f0 <main+0x250>
movapd %xmm4,%xmm3
mulsd  0x28(%rsp),%xmm3
addsd  0x40(%rsp),%xmm3
cvttsd2si %xmm3,%r12
xorpd  %xmm4,%xmm4
mov    %eax,%r13d
xchg   %ax,%ax
movsd  %xmm4,0x58(%rsp)
movapd %xmm4,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
add    $0x1,%ebp
cvttsd2si %xmm3,%rcx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
mov    %r12d,%r8d
mov    $0x1,%al
call   1080 <fprintf@plt>
movsd  0x58(%rsp),%xmm4
movsd  0x50(%rsp),%xmm0
movsd  0xb90(%rip),%xmm3
movsd  0x20(%rsp),%xmm2
movsd  0x48(%rsp),%xmm1
addsd  %xmm3,%xmm4
add    $0xffffffff,%r13d
jne    1430 <main+0x290>
jmp    13f0 <main+0x250>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    0x88(%rsp),%r14
test   %r14d,%r14d
mov    0x90(%rsp),%r12
jne    150e <main+0x36e>
mov    0x18(%rsp),%rax
imul   0x10(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x68(%rsp),%rdi
call   1050 <fclose@plt>
mov    0xc(%rsp),%esi
imul   0x30(%rsp),%esi
lea    0xd1a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
imul   %r14d,%r12d
imul   0x78(%rsp),%r12d
lea    0xd17(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    0x18(%rsp),%rax
mov    %eax,%edx
mov    0x10(%rsp),%rcx
imul   %ecx,%edx
add    $0x1,%ecx
imul   %eax,%ecx
mov    %rcx,0x10(%rsp)
mov    $0x1,%edi
mov    %eax,%ecx
xor    %ebx,%ebx
mov    %edx,0xc(%rsp)
mov    %edx,0x38(%rsp)
xor    %esi,%esi
mov    0x78(%rsp),%rdx
jmp    158d <main+0x3ed>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x40(%rsp),%esi
add    $0x1,%esi
mov    0xc(%rsp),%r8d
add    %r8d,0x38(%rsp)
mov    0x28(%rsp),%ebx
add    %r8d,%ebx
mov    0x10(%rsp),%rcx
add    %r8d,%ecx
mov    %rcx,0x10(%rsp)
mov    0x70(%rsp),%ecx
add    %r8d,%ecx
mov    0x88(%rsp),%r14
cmp    %r14d,%esi
je     14b6 <main+0x316>
mov    %esi,0x40(%rsp)
test   %r12d,%r12d
mov    %ecx,0x70(%rsp)
mov    %ebx,0x28(%rsp)
je     1550 <main+0x3b0>
xor    %ebp,%ebp
mov    %ecx,%r15d
mov    0x10(%rsp),%r13
mov    %r13d,%r14d
mov    %ebx,%r13d
mov    0x38(%rsp),%ecx
jmp    15d7 <main+0x437>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebp
add    %eax,%ecx
add    %eax,%r13d
add    %eax,%r14d
add    %eax,%r15d
cmp    %r12d,%ebp
je     1550 <main+0x3b0>
test   %edx,%edx
je     15c0 <main+0x420>
mov    %ebp,0x48(%rsp)
xor    %ebp,%ebp
mov    0x68(%rsp),%r12
mov    %r15,0x20(%rsp)
mov    %r14,0x50(%rsp)
mov    %rcx,0x58(%rsp)
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rdi,%rbp,1),%edx
lea    0x1(%r13,%rbp,1),%ecx
lea    0x2(%r13,%rbp,1),%r8d
mov    %rdi,%r15
mov    %r12,%rdi
lea    0xbbc(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x20(%rsp),%rax
lea    (%rax,%rbp,1),%edx
add    $0x2,%edx
lea    0x1(%rax,%rbp,1),%ecx
mov    0x58(%rsp),%rbx
lea    (%rbx,%rbp,1),%r8d
add    $0x1,%r8d
mov    %r12,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    (%rbx,%rbp,1),%edx
add    $0x2,%edx
mov    0x50(%rsp),%rax
lea    0x2(%rax,%rbp,1),%ecx
lea    (%rax,%rbp,1),%r8d
add    $0x1,%r8d
mov    %r12,%rdi
lea    0xb72(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %r15,%rdi
mov    0x78(%rsp),%rdx
add    $0x1,%ebp
cmp    %ebp,%edx
jne    1600 <main+0x460>
add    %ebp,%edi
mov    0x18(%rsp),%rax
mov    0x90(%rsp),%r12
mov    0x48(%rsp),%ebp
mov    0x20(%rsp),%r15
mov    0x50(%rsp),%r14
mov    0x58(%rsp),%rcx
jmp    15c0 <main+0x420>
lea    0x955(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x97c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x99a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xb45(%rip),%rdi
call   1030 <puts@plt>
lea    0xb6c(%rip),%rdi
call   1030 <puts@plt>
lea    0x9b0(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x9db(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xb7b(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [53 x i8] c"\0A\0ACall as:\0A\0A\09./cellgen nx ny nz xmin xmax ymin ymax \00"
@.str.2 = [44 x i8] c"zmin zmax\0A\0AGenerates a regular 3D mesh with\00"
@.str.3 = [60 x i8] c" limits [(xmin,xmax),(ymin,ymax),(zmin,\0Azmax)]. The output \00"
@.str.4 = [52 x i8] c"files are called 'cells.dat' and 'cellnodes.dat'.\0A\0A\00"
@.str.5 = [56 x i8] c"Example of use:\0A\0A\09mesh 100 20 10 -50 50 -10 10 -25 25\0A\0A\00"
@.str.6 = [57 x i8] c"This produces a regular mesh in the range x = (-50,50), \00"
@.str.7 = [53 x i8] c"y = (-10,10),\0Az = (-25,25) with 100 points in the x \00"
@.str.8 = [58 x i8] c"direction, 20 in the y direction\0Aand 10 in z direction.\0A\0A\00"
@.str.9 = [59 x i8] c"\0ACorrect syntaxis is:\0A\0A\09./cellgen nx ny nz xmin xmax ymin \00"
@.str.10 = [16 x i8] c"ymax zmin zmax\0A\00"
@.str.11 = [31 x i8] c"Type './cellgen -h' for help.\0A\00"
@.str.12 = [14 x i8] c"cellnodes.dat\00"
@.str.13 = [2 x i8] c"w\00"
@.str.14 = [44 x i8] c"Error: Can't open output file cellnodes.dat\00"
@.str.15 = [10 x i8] c"cells.dat\00"
@.str.16 = [40 x i8] c"Error: Can't open output file cells.dat\00"
@.str.17 = [16 x i8] c"%d\09%le\09%le\09%le\0A\00"
@.str.18 = [10 x i8] c"%d\09%d\09%d\09\00"
@.str.19 = [10 x i8] c"%d\09%d\09%d\0A\00"
@.str.20 = [21 x i8] c"\0ANumber of nodes:\09%d\00"
@.str.21 = [23 x i8] c"\0ANumber of cells:\09%d\0A\0A\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 i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%35 = load i32, i32* %4
%36 = icmp eq i32 %35, 2
br i1 %36, label %37, label %53
37: ; preds = %2
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %53
43: ; preds = %37
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0))
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
%52 = call i32 @exit(i32 0)
unreachable
53: ; preds = %37, %2
%54 = load i32, i32* %4
%55 = icmp ne i32 %54, 10
br i1 %55, label %56, label %60
56: ; preds = %53
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.9, i64 0, i64 0))
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%59 = call i32 @errorHandler(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
br label %97
60: ; preds = %53
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 1
%63 = load i8*, i8** %62
%64 = call i32 @atoi(i8* %63)
store i32 %64, i32* %12
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 2
%67 = load i8*, i8** %66
%68 = call i32 @atoi(i8* %67)
store i32 %68, i32* %13
%69 = load i8**, i8*** %5
%70 = getelementptr inbounds i8*, i8** %69, i64 3
%71 = load i8*, i8** %70
%72 = call i32 @atoi(i8* %71)
store i32 %72, i32* %14
%73 = load i8**, i8*** %5
%74 = getelementptr inbounds i8*, i8** %73, i64 4
%75 = load i8*, i8** %74
%76 = call double @atof(i8* %75)
store double %76, double* %27
%77 = load i8**, i8*** %5
%78 = getelementptr inbounds i8*, i8** %77, i64 5
%79 = load i8*, i8** %78
%80 = call double @atof(i8* %79)
store double %80, double* %28
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 6
%83 = load i8*, i8** %82
%84 = call double @atof(i8* %83)
store double %84, double* %30
%85 = load i8**, i8*** %5
%86 = getelementptr inbounds i8*, i8** %85, i64 7
%87 = load i8*, i8** %86
%88 = call double @atof(i8* %87)
store double %88, double* %31
%89 = load i8**, i8*** %5
%90 = getelementptr inbounds i8*, i8** %89, i64 8
%91 = load i8*, i8** %90
%92 = call double @atof(i8* %91)
store double %92, double* %33
%93 = load i8**, i8*** %5
%94 = getelementptr inbounds i8*, i8** %93, i64 9
%95 = load i8*, i8** %94
%96 = call double @atof(i8* %95)
store double %96, double* %34
br label %97
97: ; preds = %60, %56
br label %98
98: ; preds = %97
%99 = load double, double* %28
%100 = load double, double* %27
%101 = fsub double %99, %100
%102 = load i32, i32* %12
%103 = sub i32 %102, 1
%104 = uitofp i32 %103 to double
%105 = fdiv double %101, %104
store double %105, double* %23
%106 = load double, double* %31
%107 = load double, double* %30
%108 = fsub double %106, %107
%109 = load i32, i32* %13
%110 = sub i32 %109, 1
%111 = uitofp i32 %110 to double
%112 = fdiv double %108, %111
store double %112, double* %24
%113 = load double, double* %34
%114 = load double, double* %33
%115 = fsub double %113, %114
%116 = load i32, i32* %14
%117 = sub i32 %116, 1
%118 = uitofp i32 %117 to double
%119 = fdiv double %115, %118
store double %119, double* %25
%120 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32* %120, i32** %6
%121 = icmp eq i32* %120, null
br i1 %121, label %122, label %124
122: ; preds = %98
%123 = call i32 @errorHandler(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
br label %124
124: ; preds = %122, %98
%125 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32* %125, i32** %7
%126 = icmp eq i32* %125, null
br i1 %126, label %127, label %129
127: ; preds = %124
%128 = call i32 @errorHandler(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
br label %129
129: ; preds = %127, %124
store i32 0, i32* %8
store i32 0, i32* %11
br label %130
130: ; preds = %179, %129
%131 = load i32, i32* %11
%132 = load i32, i32* %14
%133 = icmp ult i32 %131, %132
br i1 %133, label %134, label %182
134: ; preds = %130
%135 = load double, double* %33
%136 = load i32, i32* %11
%137 = uitofp i32 %136 to double
%138 = load double, double* %25
%139 = call double @llvm.fmuladd.f64(double %137, double %138, double %135)
store double %139, double* %32
store i32 0, i32* %10
br label %140
140: ; preds = %175, %134
%141 = load i32, i32* %10
%142 = load i32, i32* %13
%143 = icmp ult i32 %141, %142
br i1 %143, label %144, label %178
144: ; preds = %140
%145 = load double, double* %30
%146 = load i32, i32* %10
%147 = uitofp i32 %146 to double
%148 = load double, double* %24
%149 = call double @llvm.fmuladd.f64(double %147, double %148, double %145)
store double %149, double* %29
store i32 0, i32* %9
br label %150
150: ; preds = %171, %144
%151 = load i32, i32* %9
%152 = load i32, i32* %12
%153 = icmp ult i32 %151, %152
br i1 %153, label %154, label %174
154: ; preds = %150
%155 = load double, double* %27
%156 = load i32, i32* %9
%157 = uitofp i32 %156 to double
%158 = load double, double* %23
%159 = call double @llvm.fmuladd.f64(double %157, double %158, double %155)
store double %159, double* %26
%160 = load i32*, i32** %6
%161 = load i32, i32* %8
%162 = add i32 %161, 1
%163 = load double, double* %26
%164 = fptoui double %163 to i32
%165 = load double, double* %29
%166 = fptoui double %165 to i32
%167 = load double, double* %32
%168 = call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %160, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0), i32 %162, i32 %164, i32 %166, double %167)
%169 = load i32, i32* %8
%170 = add i32 %169, 1
store i32 %170, i32* %8
br label %171
171: ; preds = %154
%172 = load i32, i32* %9
%173 = add i32 %172, 1
store i32 %173, i32* %9
br label %150
174: ; preds = %150
br label %175
175: ; preds = %174
%176 = load i32, i32* %10
%177 = add i32 %176, 1
store i32 %177, i32* %10
br label %140
178: ; preds = %140
br label %179
179: ; preds = %178
%180 = load i32, i32* %11
%181 = add i32 %180, 1
store i32 %181, i32* %11
br label %130
182: ; preds = %130
%183 = load i32*, i32** %6
%184 = call i32 @fclose(i32* %183)
store i32 1, i32* %8
store i32 0, i32* %11
br label %185
185: ; preds = %275, %182
%186 = load i32, i32* %11
%187 = load i32, i32* %14
%188 = sub i32 %187, 1
%189 = icmp ult i32 %186, %188
br i1 %189, label %190, label %278
190: ; preds = %185
store i32 0, i32* %10
br label %191
191: ; preds = %271, %190
%192 = load i32, i32* %10
%193 = load i32, i32* %13
%194 = sub i32 %193, 1
%195 = icmp ult i32 %192, %194
br i1 %195, label %196, label %274
196: ; preds = %191
store i32 0, i32* %9
br label %197
197: ; preds = %267, %196
%198 = load i32, i32* %9
%199 = load i32, i32* %12
%200 = sub i32 %199, 1
%201 = icmp ult i32 %198, %200
br i1 %201, label %202, label %270
202: ; preds = %197
%203 = load i32, i32* %9
%204 = load i32, i32* %10
%205 = load i32, i32* %12
%206 = mul i32 %204, %205
%207 = add i32 %203, %206
%208 = load i32, i32* %11
%209 = load i32, i32* %12
%210 = mul i32 %208, %209
%211 = load i32, i32* %13
%212 = mul i32 %210, %211
%213 = add i32 %207, %212
store i32 %213, i32* %15
%214 = load i32, i32* %15
%215 = add i32 %214, 1
store i32 %215, i32* %16
%216 = load i32, i32* %16
%217 = load i32, i32* %12
%218 = add i32 %216, %217
store i32 %218, i32* %17
%219 = load i32, i32* %15
%220 = load i32, i32* %12
%221 = add i32 %219, %220
store i32 %221, i32* %18
%222 = load i32, i32* %15
%223 = load i32, i32* %12
%224 = load i32, i32* %13
%225 = mul i32 %223, %224
%226 = add i32 %222, %225
store i32 %226, i32* %19
%227 = load i32, i32* %16
%228 = load i32, i32* %12
%229 = load i32, i32* %13
%230 = mul i32 %228, %229
%231 = add i32 %227, %230
store i32 %231, i32* %20
%232 = load i32, i32* %17
%233 = load i32, i32* %12
%234 = load i32, i32* %13
%235 = mul i32 %233, %234
%236 = add i32 %232, %235
store i32 %236, i32* %21
%237 = load i32, i32* %18
%238 = load i32, i32* %12
%239 = load i32, i32* %13
%240 = mul i32 %238, %239
%241 = add i32 %237, %240
store i32 %241, i32* %22
%242 = load i32*, i32** %7
%243 = load i32, i32* %8
%244 = load i32, i32* %15
%245 = add i32 %244, 1
%246 = load i32, i32* %16
%247 = add i32 %246, 1
%248 = call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %242, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i32 %243, i32 %245, i32 %247)
%249 = load i32*, i32** %7
%250 = load i32, i32* %17
%251 = add i32 %250, 1
%252 = load i32, i32* %18
%253 = add i32 %252, 1
%254 = load i32, i32* %19
%255 = add i32 %254, 1
%256 = call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %249, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i32 %251, i32 %253, i32 %255)
%257 = load i32*, i32** %7
%258 = load i32, i32* %20
%259 = add i32 %258, 1
%260 = load i32, i32* %21
%261 = add i32 %260, 1
%262 = load i32, i32* %22
%263 = add i32 %262, 1
%264 = call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %257, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0), i32 %259, i32 %261, i32 %263)
%265 = load i32, i32* %8
%266 = add i32 %265, 1
store i32 %266, i32* %8
br label %267
267: ; preds = %202
%268 = load i32, i32* %9
%269 = add i32 %268, 1
store i32 %269, i32* %9
br label %197
270: ; preds = %197
br label %271
271: ; preds = %270
%272 = load i32, i32* %10
%273 = add i32 %272, 1
store i32 %273, i32* %10
br label %191
274: ; preds = %191
br label %275
275: ; preds = %274
%276 = load i32, i32* %11
%277 = add i32 %276, 1
store i32 %277, i32* %11
br label %185
278: ; preds = %185
%279 = load i32*, i32** %7
%280 = call i32 @fclose(i32* %279)
%281 = load i32, i32* %12
%282 = load i32, i32* %13
%283 = mul i32 %281, %282
%284 = load i32, i32* %14
%285 = mul i32 %283, %284
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i32 %285)
%287 = load i32, i32* %12
%288 = sub i32 %287, 1
%289 = load i32, i32* %13
%290 = sub i32 %289, 1
%291 = mul i32 %288, %290
%292 = load i32, i32* %14
%293 = sub i32 %292, 1
%294 = mul i32 %291, %293
%295 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i32 %294)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [53 x i8] c"\0A\0ACall as:\0A\0A\09./cellgen nx ny nz xmin xmax ymin ymax \00"
@.str.2 = [44 x i8] c"zmin zmax\0A\0AGenerates a regular 3D mesh with\00"
@.str.3 = [60 x i8] c" limits [(xmin,xmax),(ymin,ymax),(zmin,\0Azmax)]. The output \00"
@.str.6 = [57 x i8] c"This produces a regular mesh in the range x = (-50,50), \00"
@.str.7 = [53 x i8] c"y = (-10,10),\0Az = (-25,25) with 100 points in the x \00"
@.str.9 = [59 x i8] c"\0ACorrect syntaxis is:\0A\0A\09./cellgen nx ny nz xmin xmax ymin \00"
@.str.11 = [31 x i8] c"Type './cellgen -h' for help.\0A\00"
@.str.12 = [14 x i8] c"cellnodes.dat\00"
@.str.13 = [2 x i8] c"w\00"
@.str.14 = [44 x i8] c"Error: Can't open output file cellnodes.dat\00"
@.str.15 = [10 x i8] c"cells.dat\00"
@.str.16 = [40 x i8] c"Error: Can't open output file cells.dat\00"
@.str.17 = [16 x i8] c"%d\09%le\09%le\09%le\0A\00"
@.str.18 = [10 x i8] c"%d\09%d\09%d\09\00"
@.str.19 = [10 x i8] c"%d\09%d\09%d\0A\00"
@.str.20 = [21 x i8] c"\0ANumber of nodes:\09%d\00"
@.str.21 = [23 x i8] c"\0ANumber of cells:\09%d\0A\0A\00"
@str = [15 x i8] c"ymax zmin zmax\00"
@str.22 = [51 x i8] c"files are called 'cells.dat' and 'cellnodes.dat'.\0A\00"
@str.23 = [55 x i8] c"Example of use:\0A\0A\09mesh 100 20 10 -50 50 -10 10 -25 25\0A\00"
@str.24 = [57 x i8] c"direction, 20 in the y direction\0Aand 10 in z direction.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %18 [
i32 2, label %3
i32 10, label %22
]
3: ; preds = %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %3
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.22, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.24, i64 0, i64 0))
%17 = tail call i32 @exit(i32 0)
unreachable
18: ; preds = %3, %2
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.9, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 @errorHandler(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
br label %50
22: ; preds = %2
%23 = getelementptr inbounds i8*, i8** %1, i64 1
%24 = load i8*, i8** %23
%25 = tail call i32 @atoi(i8* %24)
%26 = getelementptr inbounds i8*, i8** %1, i64 2
%27 = load i8*, i8** %26
%28 = tail call i32 @atoi(i8* %27)
%29 = getelementptr inbounds i8*, i8** %1, i64 3
%30 = load i8*, i8** %29
%31 = tail call i32 @atoi(i8* %30)
%32 = getelementptr inbounds i8*, i8** %1, i64 4
%33 = load i8*, i8** %32
%34 = tail call double @atof(i8* %33)
%35 = getelementptr inbounds i8*, i8** %1, i64 5
%36 = load i8*, i8** %35
%37 = tail call double @atof(i8* %36)
%38 = getelementptr inbounds i8*, i8** %1, i64 6
%39 = load i8*, i8** %38
%40 = tail call double @atof(i8* %39)
%41 = getelementptr inbounds i8*, i8** %1, i64 7
%42 = load i8*, i8** %41
%43 = tail call double @atof(i8* %42)
%44 = getelementptr inbounds i8*, i8** %1, i64 8
%45 = load i8*, i8** %44
%46 = tail call double @atof(i8* %45)
%47 = getelementptr inbounds i8*, i8** %1, i64 9
%48 = load i8*, i8** %47
%49 = tail call double @atof(i8* %48)
br label %50
50: ; preds = %18, %22
%51 = phi i32 [ undef, %18 ], [ %31, %22 ]
%52 = phi i32 [ undef, %18 ], [ %28, %22 ]
%53 = phi i32 [ undef, %18 ], [ %25, %22 ]
%54 = phi double [ undef, %18 ], [ %34, %22 ]
%55 = phi double [ undef, %18 ], [ %37, %22 ]
%56 = phi double [ undef, %18 ], [ %40, %22 ]
%57 = phi double [ undef, %18 ], [ %43, %22 ]
%58 = phi double [ undef, %18 ], [ %46, %22 ]
%59 = phi double [ undef, %18 ], [ %49, %22 ]
%60 = fsub double %55, %54
%61 = add i32 %53, -1
%62 = uitofp i32 %61 to double
%63 = fdiv double %60, %62
%64 = fsub double %57, %56
%65 = add i32 %52, -1
%66 = uitofp i32 %65 to double
%67 = fdiv double %64, %66
%68 = fsub double %59, %58
%69 = add i32 %51, -1
%70 = uitofp i32 %69 to double
%71 = fdiv double %68, %70
%72 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%73 = icmp eq i32* %72, null
br i1 %73, label %74, label %76
74: ; preds = %50
%75 = tail call i32 @errorHandler(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
br label %76
76: ; preds = %74, %50
%77 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%78 = icmp eq i32* %77, null
br i1 %78, label %79, label %81
79: ; preds = %76
%80 = tail call i32 @errorHandler(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
br label %81
81: ; preds = %79, %76
%82 = icmp eq i32 %51, 0
br i1 %82, label %83, label %85
83: ; preds = %81
%84 = tail call i32 @fclose(i32* %72)
br label %123
85: ; preds = %81
%86 = icmp eq i32 %52, 0
%87 = icmp eq i32 %53, 0
br label %88
88: ; preds = %85, %114
%89 = phi i32 [ 0, %85 ], [ %115, %114 ]
%90 = phi i32 [ 0, %85 ], [ %116, %114 ]
%91 = uitofp i32 %90 to double
%92 = tail call double @llvm.fmuladd.f64(double %91, double %71, double %58)
br i1 %86, label %114, label %93
93: ; preds = %88, %110
%94 = phi i32 [ %111, %110 ], [ %89, %88 ]
%95 = phi i32 [ %112, %110 ], [ 0, %88 ]
br i1 %87, label %110, label %96
96: ; preds = %93
%97 = uitofp i32 %95 to double
%98 = tail call double @llvm.fmuladd.f64(double %97, double %67, double %56)
%99 = fptoui double %98 to i32
br label %100
100: ; preds = %96, %100
%101 = phi i32 [ %94, %96 ], [ %105, %100 ]
%102 = phi i32 [ 0, %96 ], [ %108, %100 ]
%103 = uitofp i32 %102 to double
%104 = tail call double @llvm.fmuladd.f64(double %103, double %63, double %54)
%105 = add i32 %101, 1
%106 = fptoui double %104 to i32
%107 = tail call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0), i32 %105, i32 %106, i32 %99, double %92)
%108 = add nuw i32 %102, 1
%109 = icmp eq i32 %108, %53
br i1 %109, label %110, label %100
110: ; preds = %100, %93
%111 = phi i32 [ %94, %93 ], [ %105, %100 ]
%112 = add nuw i32 %95, 1
%113 = icmp eq i32 %112, %52
br i1 %113, label %114, label %93
114: ; preds = %110, %88
%115 = phi i32 [ %89, %88 ], [ %111, %110 ]
%116 = add nuw i32 %90, 1
%117 = icmp eq i32 %116, %51
br i1 %117, label %118, label %88
118: ; preds = %114
%119 = tail call i32 @fclose(i32* %72)
%120 = icmp eq i32 %69, 0
br i1 %120, label %121, label %123
121: ; preds = %118
%122 = mul i32 %53, %52
br label %167
123: ; preds = %83, %118
%124 = icmp eq i32 %65, 0
%125 = icmp eq i32 %61, 0
%126 = mul i32 %53, %52
%127 = add i32 %126, 1
br label %128
128: ; preds = %123, %163
%129 = phi i32 [ 1, %123 ], [ %164, %163 ]
%130 = phi i32 [ 0, %123 ], [ %165, %163 ]
br i1 %124, label %163, label %131
131: ; preds = %128
%132 = mul i32 %130, %52
br label %133
133: ; preds = %131, %159
%134 = phi i32 [ %129, %131 ], [ %160, %159 ]
%135 = phi i32 [ 0, %131 ], [ %161, %159 ]
br i1 %125, label %159, label %136
136: ; preds = %133
%137 = add i32 %135, %132
%138 = mul i32 %137, %53
br label %139
139: ; preds = %136, %139
%140 = phi i32 [ %134, %136 ], [ %156, %139 ]
%141 = phi i32 [ 0, %136 ], [ %157, %139 ]
%142 = add i32 %141, %138
%143 = add i32 %142, 1
%144 = add i32 %143, %53
%145 = add i32 %142, %53
%146 = add i32 %142, 2
%147 = tail call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %77, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i32 %140, i32 %143, i32 %146)
%148 = add i32 %144, 1
%149 = add i32 %145, 1
%150 = add i32 %127, %142
%151 = tail call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %77, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i32 %148, i32 %149, i32 %150)
%152 = add i32 %127, %143
%153 = add i32 %127, %144
%154 = add i32 %127, %145
%155 = tail call i32 (i32*, i8*, i32, i32, i32, ...) @fprintf(i32* %77, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0), i32 %152, i32 %153, i32 %154)
%156 = add i32 %140, 1
%157 = add nuw i32 %141, 1
%158 = icmp eq i32 %157, %61
br i1 %158, label %159, label %139
159: ; preds = %139, %133
%160 = phi i32 [ %134, %133 ], [ %156, %139 ]
%161 = add nuw i32 %135, 1
%162 = icmp eq i32 %161, %65
br i1 %162, label %163, label %133
163: ; preds = %159, %128
%164 = phi i32 [ %129, %128 ], [ %160, %159 ]
%165 = add nuw i32 %130, 1
%166 = icmp eq i32 %165, %69
br i1 %166, label %167, label %128
167: ; preds = %163, %121
%168 = phi i32 [ %122, %121 ], [ %126, %163 ]
%169 = tail call i32 @fclose(i32* %77)
%170 = mul i32 %168, %51
%171 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i32 %170)
%172 = mul i32 %65, %69
%173 = mul i32 %172, %61
%174 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i32 %173)
ret i32 0
}