#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*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reflect_params(int /*<<< orphan*/ *, int, int, int, int);
int /*<<< orphan*/ *stdout;
void reflect_input(int nvtxs, int nedges, int igeom, char *graphname,
                   char *geomname, char *inassignname, char *outassignname,
                   char *outfilename, int architecture, int ndims_tot,
                   int mesh_dims[3], int global_method, int local_method,
                   int rqi_flag, int vmax, int ndims, double eigtol, long seed,
                   FILE *outfile) {
  extern int DEBUG_TRACE;
  extern int ECHO;
  extern int OUT_ASSIGN_INV;
  extern int IN_ASSIGN_INV;
  extern int PRINT_HEADERS;
  FILE *tempfile;
  int i;
  if (DEBUG_TRACE > 0) {
    printf("<Entering reflect_input>\n");
  }
  for (i = 0; i < 2; i++) {
    if (i == 1) {
      if (ECHO < 0 && outfile != NULL) {
        tempfile = outfile;
      } else {
        break;
      }
    } else {
      tempfile = stdout;
    }
    fprintf(tempfile, "\n");
    if (PRINT_HEADERS) {
      fprintf(tempfile, "\n           Input and Parameter Values\n\n");
    }
    if (graphname != NULL) {
      fprintf(tempfile, "Graph file: `%s', ", graphname);
    }
    fprintf(tempfile, "# vertices = %d, # edges = %d\n", nvtxs, nedges);
    fprintf(tempfile, "Global method: ");
    if (global_method == 1) {
      fprintf(tempfile, "Multilevel-KL\n");
    } else if (global_method == 2) {
      fprintf(tempfile, "Spectral\n");
    } else if (global_method == 3) {
      fprintf(tempfile, "Inertial\n");
    } else if (global_method == 4) {
      fprintf(tempfile, "Linear\n");
    } else if (global_method == 5) {
      fprintf(tempfile, "Random\n");
    } else if (global_method == 6) {
      fprintf(tempfile, "Scattered\n");
    } else if (global_method == 7) {
      fprintf(tempfile, "Read-From-File ");
      if (IN_ASSIGN_INV) {
        printf("(inverted format)\n");
      } else {
        printf("(normal format)\n");
      }
    }
    if (global_method == 1) {
      fprintf(tempfile, "Number of vertices to coarsen down to: %d\n", vmax);
      fprintf(tempfile, "Eigen tolerance: %g\n", eigtol);
    } else if (global_method == 2) {
      if (rqi_flag) {
        fprintf(tempfile, "Multilevel RQI/Symmlq eigensolver\n");
        fprintf(tempfile, "Number of vertices to coarsen down to: %d\n", vmax);
        fprintf(tempfile, "Eigen tolerance: %g\n", eigtol);
      }
    } else if (global_method == 3) {
      if (geomname != NULL) {
        fprintf(tempfile, "Geometry input file: `%s', Dimensionality = %d\n",
                geomname, igeom);
      }
    } else if (global_method == 7) {
      fprintf(tempfile, "Assignment input file: `%s'\n", inassignname);
    }
    if (local_method == 1) {
      fprintf(tempfile, "Local method: Kernighan-Lin\n");
    } else if (local_method == 2) {
      fprintf(tempfile, "Local method: None\n");
    }
    if (architecture == 0) {
      fprintf(tempfile, "Partitioning target: %d-dimensional hypercube\n",
              ndims_tot);
    } else if (architecture > 0) {
      fprintf(tempfile, "Partitioning target: %d-dimensional mesh of size ",
              architecture);
      if (architecture == 1) {
        fprintf(tempfile, "%d\n", mesh_dims[0]);
      } else if (architecture == 2) {
        fprintf(tempfile, "%dx%d\n", mesh_dims[0], mesh_dims[1]);
      } else if (architecture == 3) {
        fprintf(tempfile, "%dx%dx%d\n", mesh_dims[0], mesh_dims[1],
                mesh_dims[2]);
      }
    }
    if (ndims == 1) {
      fprintf(tempfile, "Partitioning mode: Bisection\n");
    } else if (ndims == 2) {
      fprintf(tempfile, "Partitioning mode: Quadrisection\n");
    } else if (ndims == 3) {
      fprintf(tempfile, "Partitioning mode: Octasection\n");
    }
    fprintf(tempfile, "Random seed: %ld\n", seed);
    if (outassignname != NULL) {
      fprintf(tempfile, "Assignment output file: `%s' ", outassignname);
      if (OUT_ASSIGN_INV) {
        printf("(inverted format)\n");
      } else {
        printf("(normal format)\n");
      }
    }
    if (outfilename != NULL) {
      fprintf(tempfile, "Output file: `%s'\n", outfilename);
    }
    if (ECHO > 1 || ECHO < -1) {
      reflect_params(tempfile, global_method, local_method, rqi_flag, ndims);
    }
    fprintf(tempfile, "\n");
  }
}


x86 assembly (clang, -O0):
<reflect_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    0x2e36(%rip),%rax
cmpl   $0x0,(%rax)
jle    1197 <reflect_input+0x67>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x2,-0x3c(%rbp)
jge    16fe <reflect_input+0x5ce>
cmpl   $0x1,-0x3c(%rbp)
jne    11e4 <reflect_input+0xb4>
mov    0x2e27(%rip),%rax
cmpl   $0x0,(%rax)
jge    11da <reflect_input+0xaa>
cmpq   $0x0,0x68(%rbp)
je     11da <reflect_input+0xaa>
mov    0x68(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    11df <reflect_input+0xaf>
jmp    16fe <reflect_input+0x5ce>
jmp    11f2 <reflect_input+0xc2>
mov    0x2ddd(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
lea    0xe44(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2da5(%rip),%rax
cmpl   $0x0,(%rax)
je     1226 <reflect_input+0xf6>
mov    -0x38(%rbp),%rdi
lea    0xdfb(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpq   $0x0,-0x18(%rbp)
je     1247 <reflect_input+0x117>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe03(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xdfe(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe0b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0x1,0x38(%rbp)
jne    1292 <reflect_input+0x162>
mov    -0x38(%rbp),%rdi
lea    0xdff(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13a3 <reflect_input+0x273>
cmpl   $0x2,0x38(%rbp)
jne    12b3 <reflect_input+0x183>
mov    -0x38(%rbp),%rdi
lea    0xded(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    139e <reflect_input+0x26e>
cmpl   $0x3,0x38(%rbp)
jne    12d4 <reflect_input+0x1a4>
mov    -0x38(%rbp),%rdi
lea    0xdd6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1399 <reflect_input+0x269>
cmpl   $0x4,0x38(%rbp)
jne    12f5 <reflect_input+0x1c5>
mov    -0x38(%rbp),%rdi
lea    0xdbf(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1394 <reflect_input+0x264>
cmpl   $0x5,0x38(%rbp)
jne    1316 <reflect_input+0x1e6>
mov    -0x38(%rbp),%rdi
lea    0xda6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    138f <reflect_input+0x25f>
cmpl   $0x6,0x38(%rbp)
jne    1337 <reflect_input+0x207>
mov    -0x38(%rbp),%rdi
lea    0xd8d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    138a <reflect_input+0x25a>
cmpl   $0x7,0x38(%rbp)
jne    1385 <reflect_input+0x255>
mov    -0x38(%rbp),%rdi
lea    0xd77(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c8e(%rip),%rax
cmpl   $0x0,(%rax)
je     1374 <reflect_input+0x244>
lea    0xd69(%rip),%rdi
call   1030 <printf@plt>
jmp    1380 <reflect_input+0x250>
lea    0xd6b(%rip),%rdi
call   1030 <printf@plt>
jmp    1385 <reflect_input+0x255>
jmp    138a <reflect_input+0x25a>
jmp    138f <reflect_input+0x25f>
jmp    1394 <reflect_input+0x264>
jmp    1399 <reflect_input+0x269>
jmp    139e <reflect_input+0x26e>
jmp    13a3 <reflect_input+0x273>
cmpl   $0x1,0x38(%rbp)
jne    13de <reflect_input+0x2ae>
mov    -0x38(%rbp),%rdi
mov    0x50(%rbp),%edx
lea    0xd3c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
movsd  -0x30(%rbp),%xmm0
lea    0xd50(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
jmp    1497 <reflect_input+0x367>
cmpl   $0x2,0x38(%rbp)
jne    1435 <reflect_input+0x305>
cmpl   $0x0,0x48(%rbp)
je     1430 <reflect_input+0x300>
mov    -0x38(%rbp),%rdi
lea    0xd3a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
mov    0x50(%rbp),%edx
lea    0xce5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%rdi
movsd  -0x30(%rbp),%xmm0
lea    0xcf9(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
jmp    1492 <reflect_input+0x362>
cmpl   $0x3,0x38(%rbp)
jne    1468 <reflect_input+0x338>
cmpq   $0x0,-0x20(%rbp)
je     1463 <reflect_input+0x333>
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xcfe(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    148d <reflect_input+0x35d>
cmpl   $0x7,0x38(%rbp)
jne    1488 <reflect_input+0x358>
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xd09(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    148d <reflect_input+0x35d>
jmp    1492 <reflect_input+0x362>
jmp    1497 <reflect_input+0x367>
cmpl   $0x1,0x40(%rbp)
jne    14b8 <reflect_input+0x388>
mov    -0x38(%rbp),%rdi
lea    0xcfb(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    14d9 <reflect_input+0x3a9>
cmpl   $0x2,0x40(%rbp)
jne    14d4 <reflect_input+0x3a4>
mov    -0x38(%rbp),%rdi
lea    0xcf7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    14d9 <reflect_input+0x3a9>
cmpl   $0x0,0x20(%rbp)
jne    14fd <reflect_input+0x3cd>
mov    -0x38(%rbp),%rdi
mov    0x28(%rbp),%edx
lea    0xce7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    15b6 <reflect_input+0x486>
cmpl   $0x0,0x20(%rbp)
jle    15b1 <reflect_input+0x481>
mov    -0x38(%rbp),%rdi
mov    0x20(%rbp),%edx
lea    0xcf2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0x1,0x20(%rbp)
jne    1543 <reflect_input+0x413>
mov    -0x38(%rbp),%rdi
mov    0x30(%rbp),%rax
mov    (%rax),%edx
lea    0xbe7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    15ac <reflect_input+0x47c>
cmpl   $0x2,0x20(%rbp)
jne    1571 <reflect_input+0x441>
mov    -0x38(%rbp),%rdi
mov    0x30(%rbp),%rax
mov    (%rax),%edx
mov    0x30(%rbp),%rax
mov    0x4(%rax),%ecx
lea    0xcd7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    15a7 <reflect_input+0x477>
cmpl   $0x3,0x20(%rbp)
jne    15a2 <reflect_input+0x472>
mov    -0x38(%rbp),%rdi
mov    0x30(%rbp),%rax
mov    (%rax),%edx
mov    0x30(%rbp),%rax
mov    0x4(%rax),%ecx
mov    0x30(%rbp),%rax
mov    0x8(%rax),%r8d
lea    0xc9e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    15a7 <reflect_input+0x477>
jmp    15ac <reflect_input+0x47c>
jmp    15b1 <reflect_input+0x481>
jmp    15b6 <reflect_input+0x486>
cmpl   $0x1,0x58(%rbp)
jne    15d7 <reflect_input+0x4a7>
mov    -0x38(%rbp),%rdi
lea    0xc78(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    161e <reflect_input+0x4ee>
cmpl   $0x2,0x58(%rbp)
jne    15f8 <reflect_input+0x4c8>
mov    -0x38(%rbp),%rdi
lea    0xc75(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1619 <reflect_input+0x4e9>
cmpl   $0x3,0x58(%rbp)
jne    1614 <reflect_input+0x4e4>
mov    -0x38(%rbp),%rdi
lea    0xc76(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1619 <reflect_input+0x4e9>
jmp    161e <reflect_input+0x4ee>
mov    -0x38(%rbp),%rdi
mov    0x60(%rbp),%rdx
lea    0xc76(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpq   $0x0,0x10(%rbp)
je     1687 <reflect_input+0x557>
mov    -0x38(%rbp),%rdi
mov    0x10(%rbp),%rdx
lea    0xc67(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x297c(%rip),%rax
cmpl   $0x0,(%rax)
je     1676 <reflect_input+0x546>
lea    0xa67(%rip),%rdi
call   1030 <printf@plt>
jmp    1682 <reflect_input+0x552>
lea    0xa69(%rip),%rdi
call   1030 <printf@plt>
jmp    1687 <reflect_input+0x557>
cmpq   $0x0,0x18(%rbp)
je     16a8 <reflect_input+0x578>
mov    -0x38(%rbp),%rdi
mov    0x18(%rbp),%rdx
lea    0xc32(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2931(%rip),%rax
cmpl   $0x1,(%rax)
jg     16c8 <reflect_input+0x598>
mov    0x2921(%rip),%rax
cmpl   $0xffffffff,(%rax)
jge    16de <reflect_input+0x5ae>
mov    -0x38(%rbp),%rdi
mov    0x38(%rbp),%esi
mov    0x40(%rbp),%edx
mov    0x48(%rbp),%ecx
mov    0x58(%rbp),%r8d
call   1040 <reflect_params@plt>
mov    -0x38(%rbp),%rdi
lea    0x958(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    119e <reflect_input+0x6e>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reflect_input>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movsd  %xmm0,0x18(%rsp)
mov    %r9,0x20(%rsp)
mov    %r8,0x10(%rsp)
mov    %rcx,%rbx
mov    %edx,0x4(%rsp)
mov    %esi,0xc(%rsp)
mov    %edi,0x8(%rsp)
mov    0x2e34(%rip),%rax
cmpl   $0x0,(%rax)
jle    1195 <reflect_input+0x45>
lea    0x1156(%rip),%rdi
call   1030 <puts@plt>
mov    0x68(%rsp),%r14
mov    0x60(%rsp),%r15
mov    $0x1,%bpl
mov    0x88(%rsp),%eax
lea    -0x1(%rax),%r12d
xor    %eax,%eax
jmp    11de <reflect_input+0x8e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
mov    %r13,%rsi
call   1040 <fputc@plt>
mov    $0x1,%al
test   $0x1,%bpl
mov    $0x0,%ebp
je     1621 <reflect_input+0x4d1>
test   $0x1,%al
je     1210 <reflect_input+0xc0>
cmpq   $0x0,0xb8(%rsp)
je     1621 <reflect_input+0x4d1>
mov    0x2de8(%rip),%rax
cmpl   $0x0,(%rax)
mov    0xb8(%rsp),%r13
js     121a <reflect_input+0xca>
jmp    1621 <reflect_input+0x4d1>
nopw   0x0(%rax,%rax,1)
mov    0x2db1(%rip),%rax
mov    (%rax),%r13
mov    $0xa,%edi
mov    %r13,%rsi
call   1040 <fputc@plt>
mov    0x2d82(%rip),%rax
cmpl   $0x0,(%rax)
je     124c <reflect_input+0xfc>
mov    $0x28,%esi
mov    $0x1,%edx
lea    0xdd8(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
test   %rbx,%rbx
je     1265 <reflect_input+0x115>
mov    %r13,%rdi
lea    0xdea(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r13,%rdi
lea    0xde9(%rip),%rsi
mov    0x8(%rsp),%edx
mov    0xc(%rsp),%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0xf,%esi
mov    $0x1,%edx
lea    0xde8(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
cmp    $0x6,%r12d
ja     1410 <reflect_input+0x2c0>
lea    0xd58(%rip),%rcx
movslq (%rcx,%r12,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0xe,%esi
mov    $0x1,%edx
lea    0xdc5(%rip),%rdi
jmp    12fc <reflect_input+0x1ac>
mov    $0x9,%esi
mov    $0x1,%edx
lea    0xdc1(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
cmpl   $0x0,0x98(%rsp)
je     1410 <reflect_input+0x2c0>
mov    $0x22,%esi
mov    $0x1,%edx
lea    0xe19(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
mov    %r13,%rdi
lea    0xdc7(%rip),%rsi
mov    0xa0(%rsp),%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r13,%rdi
lea    0xdda(%rip),%rsi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1060 <fprintf@plt>
jmp    1410 <reflect_input+0x2c0>
mov    $0x9,%esi
mov    $0x1,%edx
lea    0xd57(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
cmpq   $0x0,0x10(%rsp)
je     1410 <reflect_input+0x2c0>
mov    %r13,%rdi
lea    0xdd1(%rip),%rsi
mov    0x10(%rsp),%rdx
mov    0x4(%rsp),%ecx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1410 <reflect_input+0x2c0>
mov    $0x7,%esi
mov    $0x1,%edx
lea    0xd1d(%rip),%rdi
jmp    13b3 <reflect_input+0x263>
mov    $0x7,%esi
mov    $0x1,%edx
lea    0xd12(%rip),%rdi
jmp    13b3 <reflect_input+0x263>
mov    $0xa,%esi
mov    $0x1,%edx
lea    0xd07(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
jmp    1410 <reflect_input+0x2c0>
mov    $0xf,%esi
mov    $0x1,%edx
lea    0xcf7(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
mov    0x2c0b(%rip),%rax
cmpl   $0x0,(%rax)
lea    0xeed(%rip),%rdi
lea    0xed6(%rip),%rax
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
lea    0xd67(%rip),%rsi
mov    0x20(%rsp),%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
nopl   (%rax)
mov    0x90(%rsp),%eax
cmp    $0x2,%eax
je     1440 <reflect_input+0x2f0>
cmp    $0x1,%eax
jne    1459 <reflect_input+0x309>
mov    $0x1c,%esi
mov    $0x1,%edx
lea    0xd53(%rip),%rdi
jmp    1451 <reflect_input+0x301>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x13,%esi
mov    $0x1,%edx
lea    0xd51(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
mov    0x70(%rsp),%edx
test   %edx,%edx
je     14b0 <reflect_input+0x360>
jle    14c5 <reflect_input+0x375>
mov    %r13,%rdi
lea    0xd78(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x70(%rsp),%eax
cmp    $0x3,%eax
je     15d7 <reflect_input+0x487>
cmp    $0x2,%eax
je     15fe <reflect_input+0x4ae>
cmp    $0x1,%eax
jne    14c5 <reflect_input+0x375>
mov    0x80(%rsp),%rax
mov    (%rax),%edx
mov    %r13,%rdi
lea    0xc59(%rip),%rsi
jmp    14be <reflect_input+0x36e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,%rdi
lea    0xcfc(%rip),%rsi
mov    0x78(%rsp),%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0xa8(%rsp),%eax
cmp    $0x3,%eax
je     14f0 <reflect_input+0x3a0>
cmp    $0x2,%eax
je     1510 <reflect_input+0x3c0>
cmp    $0x1,%eax
jne    1529 <reflect_input+0x3d9>
mov    $0x1d,%esi
mov    $0x1,%edx
lea    0xd35(%rip),%rdi
jmp    1521 <reflect_input+0x3d1>
xchg   %ax,%ax
mov    $0x1f,%esi
mov    $0x1,%edx
lea    0xd60(%rip),%rdi
jmp    1521 <reflect_input+0x3d1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x21,%esi
mov    $0x1,%edx
lea    0xd1e(%rip),%rdi
mov    %r13,%rcx
call   1070 <fwrite@plt>
mov    %r13,%rdi
lea    0xd4e(%rip),%rsi
mov    0xb0(%rsp),%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %r15,%r15
je     157c <reflect_input+0x42c>
mov    %r15,%rdx
mov    %r13,%rdi
lea    0xd3f(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x2a76(%rip),%rax
cmpl   $0x0,(%rax)
lea    0xd68(%rip),%rdi
lea    0xd51(%rip),%rax
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %r14,%rax
test   %r14,%r14
je     1598 <reflect_input+0x448>
mov    %r13,%rdi
lea    0xd23(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x2a41(%rip),%rax
mov    (%rax),%eax
add    $0xfffffffe,%eax
cmp    $0xfffffffc,%eax
ja     11c0 <reflect_input+0x70>
mov    %r13,%rdi
mov    0x88(%rsp),%esi
mov    0x90(%rsp),%edx
mov    0x98(%rsp),%ecx
mov    0xa8(%rsp),%r8d
call   1050 <reflect_params@plt>
jmp    11c0 <reflect_input+0x70>
mov    0x80(%rsp),%rax
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    0x8(%rax),%r8d
mov    %r13,%rdi
lea    0xc25(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    14c5 <reflect_input+0x375>
mov    0x80(%rsp),%rax
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    %r13,%rdi
lea    0xc05(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    14c5 <reflect_input+0x375>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@DEBUG_TRACE = external global i32
@.str = [26 x i8] c"<Entering reflect_input>\0A\00"
@ECHO = external global i32
@stdout = global i32* null
@.str.1 = [2 x i8] c"\0A\00"
@PRINT_HEADERS = external global i32
@.str.2 = [41 x i8] c"\0A Input and Parameter Values\0A\0A\00"
@.str.3 = [19 x i8] c"Graph file: `%s', \00"
@.str.4 = [31 x i8] c"# vertices = %d, # edges = %d\0A\00"
@.str.5 = [16 x i8] c"Global method: \00"
@.str.6 = [15 x i8] c"Multilevel-KL\0A\00"
@.str.7 = [10 x i8] c"Spectral\0A\00"
@.str.8 = [10 x i8] c"Inertial\0A\00"
@.str.9 = [8 x i8] c"Linear\0A\00"
@.str.10 = [8 x i8] c"Random\0A\00"
@.str.11 = [11 x i8] c"Scattered\0A\00"
@.str.12 = [16 x i8] c"Read-From-File \00"
@IN_ASSIGN_INV = external global i32
@.str.13 = [19 x i8] c"(inverted format)\0A\00"
@.str.14 = [17 x i8] c"(normal format)\0A\00"
@.str.15 = [43 x i8] c"Number of vertices to coarsen down to: %d\0A\00"
@.str.16 = [21 x i8] c"Eigen tolerance: %g\0A\00"
@.str.17 = [35 x i8] c"Multilevel RQI/Symmlq eigensolver\0A\00"
@.str.18 = [48 x i8] c"Geometry input file: `%s', Dimensionality = %d\0A\00"
@.str.19 = [29 x i8] c"Assignment input file: `%s'\0A\00"
@.str.20 = [29 x i8] c"Local method: Kernighan-Lin\0A\00"
@.str.21 = [20 x i8] c"Local method: None\0A\00"
@.str.22 = [47 x i8] c"Partitioning target: %d-dimensional hypercube\0A\00"
@.str.23 = [50 x i8] c"Partitioning target: %d-dimensional mesh of size \00"
@.str.24 = [4 x i8] c"%d\0A\00"
@.str.25 = [7 x i8] c"%dx%d\0A\00"
@.str.26 = [10 x i8] c"%dx%dx%d\0A\00"
@.str.27 = [30 x i8] c"Partitioning mode: Bisection\0A\00"
@.str.28 = [34 x i8] c"Partitioning mode: Quadrisection\0A\00"
@.str.29 = [32 x i8] c"Partitioning mode: Octasection\0A\00"
@.str.30 = [18 x i8] c"Random seed: %ld\0A\00"
@.str.31 = [30 x i8] c"Assignment output file: `%s' \00"
@OUT_ASSIGN_INV = external global i32
@.str.32 = [19 x i8] c"Output file: `%s'\0A\00"
define void @reflect_input(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i32 %8, i32 %9, i32* %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, double %16, i64 %17, i32* %18) {
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i8*
%25 = alloca i8*
%26 = alloca i8*
%27 = alloca i8*
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32*
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca double
%37 = alloca i64
%38 = alloca i32*
%39 = alloca i32*
%40 = alloca i32
store i32 %0, i32* %20
store i32 %1, i32* %21
store i32 %2, i32* %22
store i8* %3, i8** %23
store i8* %4, i8** %24
store i8* %5, i8** %25
store i8* %6, i8** %26
store i8* %7, i8** %27
store i32 %8, i32* %28
store i32 %9, i32* %29
store i32* %10, i32** %30
store i32 %11, i32* %31
store i32 %12, i32* %32
store i32 %13, i32* %33
store i32 %14, i32* %34
store i32 %15, i32* %35
store double %16, double* %36
store i64 %17, i64* %37
store i32* %18, i32** %38
%41 = load i32, i32* @DEBUG_TRACE
%42 = icmp sgt i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %19
%44 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %45
45: ; preds = %43, %19
store i32 0, i32* %40
br label %46
46: ; preds = %314, %45
%47 = load i32, i32* %40
%48 = icmp slt i32 %47, 2
br i1 %48, label %49, label %317
49: ; preds = %46
%50 = load i32, i32* %40
%51 = icmp eq i32 %50, 1
br i1 %51, label %52, label %62
52: ; preds = %49
%53 = load i32, i32* @ECHO
%54 = icmp slt i32 %53, 0
br i1 %54, label %55, label %60
55: ; preds = %52
%56 = load i32*, i32** %38
%57 = icmp ne i32* %56, null
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = load i32*, i32** %38
store i32* %59, i32** %39
br label %61
60: ; preds = %55, %52
br label %317
61: ; preds = %58
br label %64
62: ; preds = %49
%63 = load i32*, i32** @stdout
store i32* %63, i32** %39
br label %64
64: ; preds = %62, %61
%65 = load i32*, i32** %39
%66 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%67 = load i32, i32* @PRINT_HEADERS
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %72
69: ; preds = %64
%70 = load i32*, i32** %39
%71 = call i32 (i32*, i8*, ...) @fprintf(i32* %70, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
br label %72
72: ; preds = %69, %64
%73 = load i8*, i8** %23
%74 = icmp ne i8* %73, null
br i1 %74, label %75, label %79
75: ; preds = %72
%76 = load i32*, i32** %39
%77 = load i8*, i8** %23
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %76, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %77)
br label %79
79: ; preds = %75, %72
%80 = load i32*, i32** %39
%81 = load i32, i32* %20
%82 = load i32, i32* %21
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %81, i32 %82)
%84 = load i32*, i32** %39
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%86 = load i32, i32* %31
%87 = icmp eq i32 %86, 1
br i1 %87, label %88, label %91
88: ; preds = %79
%89 = load i32*, i32** %39
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %89, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %140
91: ; preds = %79
%92 = load i32, i32* %31
%93 = icmp eq i32 %92, 2
br i1 %93, label %94, label %97
94: ; preds = %91
%95 = load i32*, i32** %39
%96 = call i32 (i32*, i8*, ...) @fprintf(i32* %95, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
br label %139
97: ; preds = %91
%98 = load i32, i32* %31
%99 = icmp eq i32 %98, 3
br i1 %99, label %100, label %103
100: ; preds = %97
%101 = load i32*, i32** %39
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %101, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %138
103: ; preds = %97
%104 = load i32, i32* %31
%105 = icmp eq i32 %104, 4
br i1 %105, label %106, label %109
106: ; preds = %103
%107 = load i32*, i32** %39
%108 = call i32 (i32*, i8*, ...) @fprintf(i32* %107, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %137
109: ; preds = %103
%110 = load i32, i32* %31
%111 = icmp eq i32 %110, 5
br i1 %111, label %112, label %115
112: ; preds = %109
%113 = load i32*, i32** %39
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %113, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
br label %136
115: ; preds = %109
%116 = load i32, i32* %31
%117 = icmp eq i32 %116, 6
br i1 %117, label %118, label %121
118: ; preds = %115
%119 = load i32*, i32** %39
%120 = call i32 (i32*, i8*, ...) @fprintf(i32* %119, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
br label %135
121: ; preds = %115
%122 = load i32, i32* %31
%123 = icmp eq i32 %122, 7
br i1 %123, label %124, label %134
124: ; preds = %121
%125 = load i32*, i32** %39
%126 = call i32 (i32*, i8*, ...) @fprintf(i32* %125, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%127 = load i32, i32* @IN_ASSIGN_INV
%128 = icmp ne i32 %127, 0
br i1 %128, label %129, label %131
129: ; preds = %124
%130 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0))
br label %133
131: ; preds = %124
%132 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
br label %133
133: ; preds = %131, %129
br label %134
134: ; preds = %133, %121
br label %135
135: ; preds = %134, %118
br label %136
136: ; preds = %135, %112
br label %137
137: ; preds = %136, %106
br label %138
138: ; preds = %137, %100
br label %139
139: ; preds = %138, %94
br label %140
140: ; preds = %139, %88
%141 = load i32, i32* %31
%142 = icmp eq i32 %141, 1
br i1 %142, label %143, label %150
143: ; preds = %140
%144 = load i32*, i32** %39
%145 = load i32, i32* %34
%146 = call i32 (i32*, i8*, ...) @fprintf(i32* %144, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %145)
%147 = load i32*, i32** %39
%148 = load double, double* %36
%149 = call i32 (i32*, i8*, ...) @fprintf(i32* %147, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), double %148)
br label %188
150: ; preds = %140
%151 = load i32, i32* %31
%152 = icmp eq i32 %151, 2
br i1 %152, label %153, label %166
153: ; preds = %150
%154 = load i32, i32* %33
%155 = icmp ne i32 %154, 0
br i1 %155, label %156, label %165
156: ; preds = %153
%157 = load i32*, i32** %39
%158 = call i32 (i32*, i8*, ...) @fprintf(i32* %157, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0))
%159 = load i32*, i32** %39
%160 = load i32, i32* %34
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %159, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %160)
%162 = load i32*, i32** %39
%163 = load double, double* %36
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), double %163)
br label %165
165: ; preds = %156, %153
br label %187
166: ; preds = %150
%167 = load i32, i32* %31
%168 = icmp eq i32 %167, 3
br i1 %168, label %169, label %178
169: ; preds = %166
%170 = load i8*, i8** %24
%171 = icmp ne i8* %170, null
br i1 %171, label %172, label %177
172: ; preds = %169
%173 = load i32*, i32** %39
%174 = load i8*, i8** %24
%175 = load i32, i32* %22
%176 = call i32 (i32*, i8*, ...) @fprintf(i32* %173, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.18, i64 0, i64 0), i8* %174, i32 %175)
br label %177
177: ; preds = %172, %169
br label %186
178: ; preds = %166
%179 = load i32, i32* %31
%180 = icmp eq i32 %179, 7
br i1 %180, label %181, label %185
181: ; preds = %178
%182 = load i32*, i32** %39
%183 = load i8*, i8** %25
%184 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0), i8* %183)
br label %185
185: ; preds = %181, %178
br label %186
186: ; preds = %185, %177
br label %187
187: ; preds = %186, %165
br label %188
188: ; preds = %187, %143
%189 = load i32, i32* %32
%190 = icmp eq i32 %189, 1
br i1 %190, label %191, label %194
191: ; preds = %188
%192 = load i32*, i32** %39
%193 = call i32 (i32*, i8*, ...) @fprintf(i32* %192, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0))
br label %201
194: ; preds = %188
%195 = load i32, i32* %32
%196 = icmp eq i32 %195, 2
br i1 %196, label %197, label %200
197: ; preds = %194
%198 = load i32*, i32** %39
%199 = call i32 (i32*, i8*, ...) @fprintf(i32* %198, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))
br label %200
200: ; preds = %197, %194
br label %201
201: ; preds = %200, %191
%202 = load i32, i32* %28
%203 = icmp eq i32 %202, 0
br i1 %203, label %204, label %208
204: ; preds = %201
%205 = load i32*, i32** %39
%206 = load i32, i32* %29
%207 = call i32 (i32*, i8*, ...) @fprintf(i32* %205, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.22, i64 0, i64 0), i32 %206)
br label %254
208: ; preds = %201
%209 = load i32, i32* %28
%210 = icmp sgt i32 %209, 0
br i1 %210, label %211, label %253
211: ; preds = %208
%212 = load i32*, i32** %39
%213 = load i32, i32* %28
%214 = call i32 (i32*, i8*, ...) @fprintf(i32* %212, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.23, i64 0, i64 0), i32 %213)
%215 = load i32, i32* %28
%216 = icmp eq i32 %215, 1
br i1 %216, label %217, label %223
217: ; preds = %211
%218 = load i32*, i32** %39
%219 = load i32*, i32** %30
%220 = getelementptr inbounds i32, i32* %219, i64 0
%221 = load i32, i32* %220
%222 = call i32 (i32*, i8*, ...) @fprintf(i32* %218, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0), i32 %221)
br label %252
223: ; preds = %211
%224 = load i32, i32* %28
%225 = icmp eq i32 %224, 2
br i1 %225, label %226, label %235
226: ; preds = %223
%227 = load i32*, i32** %39
%228 = load i32*, i32** %30
%229 = getelementptr inbounds i32, i32* %228, i64 0
%230 = load i32, i32* %229
%231 = load i32*, i32** %30
%232 = getelementptr inbounds i32, i32* %231, i64 1
%233 = load i32, i32* %232
%234 = call i32 (i32*, i8*, ...) @fprintf(i32* %227, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i64 0, i64 0), i32 %230, i32 %233)
br label %251
235: ; preds = %223
%236 = load i32, i32* %28
%237 = icmp eq i32 %236, 3
br i1 %237, label %238, label %250
238: ; preds = %235
%239 = load i32*, i32** %39
%240 = load i32*, i32** %30
%241 = getelementptr inbounds i32, i32* %240, i64 0
%242 = load i32, i32* %241
%243 = load i32*, i32** %30
%244 = getelementptr inbounds i32, i32* %243, i64 1
%245 = load i32, i32* %244
%246 = load i32*, i32** %30
%247 = getelementptr inbounds i32, i32* %246, i64 2
%248 = load i32, i32* %247
%249 = call i32 (i32*, i8*, ...) @fprintf(i32* %239, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0), i32 %242, i32 %245, i32 %248)
br label %250
250: ; preds = %238, %235
br label %251
251: ; preds = %250, %226
br label %252
252: ; preds = %251, %217
br label %253
253: ; preds = %252, %208
br label %254
254: ; preds = %253, %204
%255 = load i32, i32* %35
%256 = icmp eq i32 %255, 1
br i1 %256, label %257, label %260
257: ; preds = %254
%258 = load i32*, i32** %39
%259 = call i32 (i32*, i8*, ...) @fprintf(i32* %258, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0))
br label %274
260: ; preds = %254
%261 = load i32, i32* %35
%262 = icmp eq i32 %261, 2
br i1 %262, label %263, label %266
263: ; preds = %260
%264 = load i32*, i32** %39
%265 = call i32 (i32*, i8*, ...) @fprintf(i32* %264, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.28, i64 0, i64 0))
br label %273
266: ; preds = %260
%267 = load i32, i32* %35
%268 = icmp eq i32 %267, 3
br i1 %268, label %269, label %272
269: ; preds = %266
%270 = load i32*, i32** %39
%271 = call i32 (i32*, i8*, ...) @fprintf(i32* %270, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.29, i64 0, i64 0))
br label %272
272: ; preds = %269, %266
br label %273
273: ; preds = %272, %263
br label %274
274: ; preds = %273, %257
%275 = load i32*, i32** %39
%276 = load i64, i64* %37
%277 = call i32 (i32*, i8*, ...) @fprintf(i32* %275, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.30, i64 0, i64 0), i64 %276)
%278 = load i8*, i8** %26
%279 = icmp ne i8* %278, null
br i1 %279, label %280, label %291
280: ; preds = %274
%281 = load i32*, i32** %39
%282 = load i8*, i8** %26
%283 = call i32 (i32*, i8*, ...) @fprintf(i32* %281, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i64 0, i64 0), i8* %282)
%284 = load i32, i32* @OUT_ASSIGN_INV
%285 = icmp ne i32 %284, 0
br i1 %285, label %286, label %288
286: ; preds = %280
%287 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0))
br label %290
288: ; preds = %280
%289 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
br label %290
290: ; preds = %288, %286
br label %291
291: ; preds = %290, %274
%292 = load i8*, i8** %27
%293 = icmp ne i8* %292, null
br i1 %293, label %294, label %298
294: ; preds = %291
%295 = load i32*, i32** %39
%296 = load i8*, i8** %27
%297 = call i32 (i32*, i8*, ...) @fprintf(i32* %295, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.32, i64 0, i64 0), i8* %296)
br label %298
298: ; preds = %294, %291
%299 = load i32, i32* @ECHO
%300 = icmp sgt i32 %299, 1
br i1 %300, label %304, label %301
301: ; preds = %298
%302 = load i32, i32* @ECHO
%303 = icmp slt i32 %302, -1
br i1 %303, label %304, label %311
304: ; preds = %301, %298
%305 = load i32*, i32** %39
%306 = load i32, i32* %31
%307 = load i32, i32* %32
%308 = load i32, i32* %33
%309 = load i32, i32* %35
%310 = call i32 @reflect_params(i32* %305, i32 %306, i32 %307, i32 %308, i32 %309)
br label %311
311: ; preds = %304, %301
%312 = load i32*, i32** %39
%313 = call i32 (i32*, i8*, ...) @fprintf(i32* %312, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %314
314: ; preds = %311
%315 = load i32, i32* %40
%316 = add nsw i32 %315, 1
store i32 %316, i32* %40
br label %46
317: ; preds = %60, %46
ret void
}

LLVM IR (-O2):
@DEBUG_TRACE = external global i32
@ECHO = external global i32
@stdout = global i32* null
@PRINT_HEADERS = external global i32
@.str.2 = [41 x i8] c"\0A Input and Parameter Values\0A\0A\00"
@.str.3 = [19 x i8] c"Graph file: `%s', \00"
@.str.4 = [31 x i8] c"# vertices = %d, # edges = %d\0A\00"
@.str.5 = [16 x i8] c"Global method: \00"
@.str.6 = [15 x i8] c"Multilevel-KL\0A\00"
@.str.7 = [10 x i8] c"Spectral\0A\00"
@.str.8 = [10 x i8] c"Inertial\0A\00"
@.str.9 = [8 x i8] c"Linear\0A\00"
@.str.10 = [8 x i8] c"Random\0A\00"
@.str.11 = [11 x i8] c"Scattered\0A\00"
@.str.12 = [16 x i8] c"Read-From-File \00"
@IN_ASSIGN_INV = external global i32
@.str.15 = [43 x i8] c"Number of vertices to coarsen down to: %d\0A\00"
@.str.16 = [21 x i8] c"Eigen tolerance: %g\0A\00"
@.str.17 = [35 x i8] c"Multilevel RQI/Symmlq eigensolver\0A\00"
@.str.18 = [48 x i8] c"Geometry input file: `%s', Dimensionality = %d\0A\00"
@.str.19 = [29 x i8] c"Assignment input file: `%s'\0A\00"
@.str.20 = [29 x i8] c"Local method: Kernighan-Lin\0A\00"
@.str.21 = [20 x i8] c"Local method: None\0A\00"
@.str.22 = [47 x i8] c"Partitioning target: %d-dimensional hypercube\0A\00"
@.str.23 = [50 x i8] c"Partitioning target: %d-dimensional mesh of size \00"
@.str.24 = [4 x i8] c"%d\0A\00"
@.str.25 = [7 x i8] c"%dx%d\0A\00"
@.str.26 = [10 x i8] c"%dx%dx%d\0A\00"
@.str.27 = [30 x i8] c"Partitioning mode: Bisection\0A\00"
@.str.28 = [34 x i8] c"Partitioning mode: Quadrisection\0A\00"
@.str.29 = [32 x i8] c"Partitioning mode: Octasection\0A\00"
@.str.30 = [18 x i8] c"Random seed: %ld\0A\00"
@.str.31 = [30 x i8] c"Assignment output file: `%s' \00"
@OUT_ASSIGN_INV = external global i32
@.str.32 = [19 x i8] c"Output file: `%s'\0A\00"
@str.34 = [16 x i8] c"(normal format)\00"
@str.35 = [18 x i8] c"(inverted format)\00"
@str.36 = [25 x i8] c"<Entering reflect_input>\00"
define void @reflect_input(i32 %0, i32 %1, i32 %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i32 %8, i32 %9, i32* nocapture %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, double %16, i64 %17, i32* %18) {
%20 = load i32, i32* @DEBUG_TRACE
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.36, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
%25 = icmp ne i32* %18, null
%26 = icmp eq i8* %3, null
%27 = icmp eq i8* %4, null
%28 = icmp eq i32 %13, 0
%29 = icmp eq i32 %8, 0
%30 = icmp sgt i32 %8, 0
%31 = getelementptr inbounds i32, i32* %10, i64 1
%32 = getelementptr inbounds i32, i32* %10, i64 2
%33 = icmp eq i8* %6, null
%34 = icmp eq i8* %7, null
br label %35
35: ; preds = %24, %131
%36 = phi i1 [ false, %24 ], [ true, %131 ]
%37 = phi i1 [ true, %24 ], [ false, %131 ]
br i1 %36, label %38, label %42
38: ; preds = %35
%39 = load i32, i32* @ECHO
%40 = icmp slt i32 %39, 0
%41 = and i1 %25, %40
br i1 %41, label %44, label %133
42: ; preds = %35
%43 = load i32*, i32** @stdout
br label %44
44: ; preds = %38, %42
%45 = phi i32* [ %43, %42 ], [ %18, %38 ]
%46 = tail call i32 @fputc(i32 10, i32* %45)
%47 = load i32, i32* @PRINT_HEADERS
%48 = icmp eq i32 %47, 0
br i1 %48, label %51, label %49
49: ; preds = %44
%50 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i64 40, i64 1, i32* %45)
br label %51
51: ; preds = %49, %44
br i1 %26, label %54, label %52
52: ; preds = %51
%53 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %3)
br label %54
54: ; preds = %52, %51
%55 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %0, i32 %1)
%56 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i64 15, i64 1, i32* %45)
switch i32 %11, label %84 [
i32 1, label %74
i32 2, label %57
i32 3, label %59
i32 4, label %61
i32 5, label %63
i32 6, label %65
i32 7, label %67
]
57: ; preds = %54
%58 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i64 9, i64 1, i32* %45)
br i1 %28, label %84, label %78
59: ; preds = %54
%60 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i64 9, i64 1, i32* %45)
br i1 %27, label %84, label %82
61: ; preds = %54
%62 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i64 7, i64 1, i32* %45)
br label %84
63: ; preds = %54
%64 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i64 7, i64 1, i32* %45)
br label %84
65: ; preds = %54
%66 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i64 10, i64 1, i32* %45)
br label %84
67: ; preds = %54
%68 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i64 15, i64 1, i32* %45)
%69 = load i32, i32* @IN_ASSIGN_INV
%70 = icmp eq i32 %69, 0
%71 = select i1 %70, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.34, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.35, i64 0, i64 0)
%72 = tail call i32 @puts(i8* dereferenceable(1) %71)
%73 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0), i8* %5)
br label %84
74: ; preds = %54
%75 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i64 14, i64 1, i32* %45)
%76 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %14)
%77 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), double %16)
br label %84
78: ; preds = %57
%79 = tail call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i64 34, i64 1, i32* %45)
%80 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %14)
%81 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), double %16)
br label %84
82: ; preds = %59
%83 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.18, i64 0, i64 0), i8* %4, i32 %2)
br label %84
84: ; preds = %54, %63, %65, %61, %78, %57, %67, %59, %82, %74
switch i32 %12, label %89 [
i32 1, label %85
i32 2, label %87
]
85: ; preds = %84
%86 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0), i64 28, i64 1, i32* %45)
br label %89
87: ; preds = %84
%88 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i64 19, i64 1, i32* %45)
br label %89
89: ; preds = %84, %87, %85
br i1 %29, label %90, label %92
90: ; preds = %89
%91 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.22, i64 0, i64 0), i32 %9)
br label %107
92: ; preds = %89
br i1 %30, label %93, label %107
93: ; preds = %92
%94 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.23, i64 0, i64 0), i32 %8)
switch i32 %8, label %107 [
i32 1, label %95
i32 2, label %98
i32 3, label %102
]
95: ; preds = %93
%96 = load i32, i32* %10
%97 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0), i32 %96)
br label %107
98: ; preds = %93
%99 = load i32, i32* %10
%100 = load i32, i32* %31
%101 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i64 0, i64 0), i32 %99, i32 %100)
br label %107
102: ; preds = %93
%103 = load i32, i32* %10
%104 = load i32, i32* %31
%105 = load i32, i32* %32
%106 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0), i32 %103, i32 %104, i32 %105)
br label %107
107: ; preds = %93, %92, %98, %102, %95, %90
switch i32 %15, label %114 [
i32 1, label %108
i32 2, label %110
i32 3, label %112
]
108: ; preds = %107
%109 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.27, i64 0, i64 0), i64 29, i64 1, i32* %45)
br label %114
110: ; preds = %107
%111 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.28, i64 0, i64 0), i64 33, i64 1, i32* %45)
br label %114
112: ; preds = %107
%113 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.29, i64 0, i64 0), i64 31, i64 1, i32* %45)
br label %114
114: ; preds = %107, %110, %112, %108
%115 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.30, i64 0, i64 0), i64 %17)
br i1 %33, label %122, label %116
116: ; preds = %114
%117 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i64 0, i64 0), i8* %6)
%118 = load i32, i32* @OUT_ASSIGN_INV
%119 = icmp eq i32 %118, 0
%120 = select i1 %119, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.34, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.35, i64 0, i64 0)
%121 = tail call i32 @puts(i8* dereferenceable(1) %120)
br label %122
122: ; preds = %116, %114
br i1 %34, label %125, label %123
123: ; preds = %122
%124 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.32, i64 0, i64 0), i8* %7)
br label %125
125: ; preds = %123, %122
%126 = load i32, i32* @ECHO
%127 = add i32 %126, -2
%128 = icmp ult i32 %127, -3
br i1 %128, label %129, label %131
129: ; preds = %125
%130 = tail call i32 @reflect_params(i32* %45, i32 %11, i32 %12, i32 %13, i32 %15)
br label %131
131: ; preds = %125, %129
%132 = tail call i32 @fputc(i32 10, i32* %45)
br i1 %37, label %35, label %133
133: ; preds = %38, %131
ret void
}